Tuesday, October 15, 2019

                                        E-BOX    

                                   BASICS OF C PROGRAMMING   

I/O Statements,Operators And Expressions :-  I - Design


PROGRAM -15 :


PROBLEM

S1P15-TALENT SHOW

Talent Show
Mountain View Middle School is all set for organizing their elaborate talent show event of the year, "Stars Onstage". It is a fun-filled event for the students to showcase and build their confidence.
 
Of the total audience who had come for the show, 1/3 were boys, 3/6 were girls and the rest of them were adults. If there were 'x' more girls than adults, how many people were there in total? Help the School authorities to find the total people who visited their show.

 
Input Format:
First line of the input is an integer 'x', which corresponds to the count of girls more than adults.
 
Output Format:
Output the total number of people who had visited the talent show.
Refer sample input and output for formatting specifications.
[All text in bold corresponds to input and rest corresponds to output.]

Sample Input and Output1:
Enter x
50
150 people were there in total

Sample Input and Output2:
Enter x
70
210 people were there in total

 PROBLEM

S1P15-TALENT SHOW

Talent Show
Mountain View Middle School is all set for organizing their elaborate talent show event of the year, "Stars Onstage". It is a fun-filled event for the students to showcase and build their confidence.
 
Of the total audience who had come for the show, 1/3 were boys, 3/6 were girls and the rest of them were adults. If there were 'x' more girls than adults, how many people were there in total? Help the School authorities to find the total people who visited their show.

 
Input Format:
First line of the input is an integer 'x', which corresponds to the count of girls more than adults.
 
Output Format:
Output the total number of people who had visited the talent show.
Refer sample input and output for formatting specifications.
[All text in bold corresponds to input and rest corresponds to output.]

Sample Input and Output1:
Enter x
50
150 people were there in total

Sample Input and Output2:
Enter x
70
210 people were there in total


SOLUTION :



No comments:

Post a Comment

                                                 E-BOX                                                     BASICS OF C PROGRAMMING       i -...

https://amzn.to/2LAmadv