Friday, November 21, 2014

Dynamic Web Site --- Prototype

College web team has planned to develop a dynamic college web site using STRUTS framework. They submitted this project proposal to the Principal. Principal asked them to develop a prototype of the Home Page and asked them to give a demo tomorrow.
College web team requests your help to develop the prototype. Can you please help them out?

Sample Input and Output: 
[All text in bold corresponds to input and the rest corresponds to output]
Enter college name
AIT
Enter college locality
Kurumbapalayam
Enter college's vision
EnrichingStudentMinds
Enter college's mission
ActivityBasedLearning
Enter the number of departments
5
Enter student strength
1000
Enter college rating
A
AIT
Kurumbapalayam
______________________________
Vision
EnrichingStudentMinds
______________________________
Mission
ActivityBasedLearning
______________________________
Number of departments
5
______________________________
Student Strength
1000
______________________________
College Rating
A
______________________________


#include<stdio.h>
int main ()
{
  char collegename[100],collegelocality[100],vision[100],mission[100];
  int noofdepartments, studentsstrength;
  char rating;
  printf("Enter college name\n");
  scanf("%s", collegename);
  printf("Enter college locality\n");
  scanf("%s", collegelocality);
  printf("Enter college's vision\n");
  scanf("%s", vision);
  printf("Enter college's mission\n");
  scanf("%s", mission);
  printf("Enter the number of departments\n");
  scanf("%d", &noofdepartments);
  printf("Enter student strength\n");
  scanf("%d", &studentsstrength);
  printf("Enter college rating\n");
  scanf("\n%c",&rating);
  printf("%s\n", collegename);
  printf("%s\n", collegelocality);
  printf("______________________________\n");
  printf("Vision\n%s\n", vision);
  printf("______________________________\n");
  printf("Mission\n%s\n", mission);
  printf("______________________________\n");
  printf("Number of departments\n%d\n", noofdepartments);
  printf("______________________________\n");
  printf("Student Strength\n%d\n", studentsstrength);
  printf("______________________________\n");
  printf("College Rating\n%c\n", rating);
  printf("______________________________\n");
  return 0;
}

No comments:

Post a Comment