Computer Science, asked by sadiaswarna390, 1 year ago

Define a structure named Movie Star which will have the following elements: Name(string),Rating(float),Total Fans (int). Declare a structure array of moviestar for 5 movie stars.noe take N user reviews as input . Each review will consist of a movie star name and his rating by a new fan . Now adjust each movie stars rating according to the reviews and show the results. Rating of a movie star is the average rating given by fans those who rated him?

Answers

Answered by sailorking
2

Answer:

The concept of structure in programming is used in only C and C++ programming languages, it is also known as non-primitive datatype, it consists of multiple datatype, which together form a new datatype.

Explanation:

The syntax of writing structure, in programming  is as follows:-

struct MovieStar

{

string name;

float rating;

int TotalFans;

};

void main ( )

{

struct MovieStar star [ 5 ] ;

for ( int i = 0; i < 5 ; i++ )

{

star . name = " Abcd " ;

star . rating = 4 ;

star . TotalFans = 6 ;

}

}

Similar questions