Friday, November 21, 2014

NEWSPAPER REPORT

In Japan ,there was a very huge Tsunami. Millions and millions worth buildings and properties were destroyed. Many people lost their lives. Most of them were injured and few were safe. A news reporter arrives to the spot to take the current survey regarding the situation of the people alive , dead and injured. He wanted to publish it in the newspaper and ask the other countries to help the affected people.  
Can you please help him in this noble cause by writing a C program to generate the newspaper report?

SAMPLE INPUT AND OUTPUT FORMAT:
Enter the number of people dead:
2000
Enter the number of people injured:
3000
Enter the number of people safe:
10000
TSUNAMI REPORT OF JAPAN
The number of people
1)Dead:2000
2)Injured:3000
3)Safe:10000
Please help the people who are suffering!!!

include<stdio.h>
int main ()
{
  int dead;
  int injured;
  int safe;
  printf("Enter the number of people dead:\n");
  scanf("%d", &dead);
  printf("Enter the number of people injured:\n");
  scanf("%d", &injured);
  printf("Enter the number of people safe:\n");
  scanf("%d", &safe);
  printf("TSUNAMI REPORT OF JAPAN\n");
  printf("The number of people\n");
  printf("1)Dead:%d\n", dead);
  printf("2)Injured:%d\n", injured);
  printf("3)Safe:%d\n", safe);
  printf("Please help the people who are suffering!!!");
  return 0;
}

1 comment:

  1. During the Physical Education hour, PD sir Mr. Sundar has decided to conduct some team games. He wants to split the students in the class into equal sized teams. In some cases, there may be some students who are left out from teams and he wanted to use the left out students to assist him in conducting the team games.
    For instance, if there are 50 students in the class and if the class has to be divided into 7 equal sized teams, 7 students will be there in each team and 1 student will be left out.
    PD sir asks your help to automate this team splitting task. Can you please help him out?

    Input Format:
    Input consists of 2 integers. The first integer corresponds to the number of students in the class and the second integer corresponds to the number of teams.

    Output Format:
    Refer sample input and output for formatting specifications.

    Sample Input and Output:
    [All text in bold corresponds to input and the rest corresponds to output]
    Enter the number of students in the class
    60
    Enter the number of teams
    8
    The number of students in each team is 7 and the number of students left out is 4
    PLZ HELP ME TO WRITE THZ PROGRAM
    try thizz

    ReplyDelete