Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- struct numOfColleges {
- char name[32];
- int numOfStudents;
- int numOfCafedras;
- int numOfFacultets;
- };
- struct numOfColleges nn[4];
- int i = 0;
- char c;
- char tmp_name[32];
- for(i;i<4;i++) {
- printf("enter name of college: ");
- gets(nn[i].name);
- printf("enter number of students: ");
- gets(tmp_name);
- nn[i].numOfStudents = atoi(tmp_name);
- printf("enter number of cafedras: ");
- gets(tmp_name);
- nn[i].numOfCafedras = atoi(tmp_name);
- printf("enter number of facultets: ");
- gets(tmp_name);
- nn[i].numOfFacultets = atoi(tmp_name);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment