Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.87 KB | None | 0 0
  1. ///SOURCE CODE
  2. ///Cloned:: CSE 134: SPL Lab Final Exam for Session 2017-18 for Up-solve
  3. ///PROBLEM-C-Who would be Served First?
  4. //I just want to take input and give output first
  5. #include<stdio.h>
  6. #include<math.h>
  7. #include<stdlib.h>
  8. int i=0,j=0;
  9. struct io
  10. {
  11.     char name[20];
  12.     int age,batch;
  13.     float weight,height;
  14.     long long int p_t,dot,reg_no;
  15. }nigga[1000000];
  16.  
  17. int main()
  18. {
  19.     i=0;j=0;
  20.     while(scanf("%s %d %f %f %d %lld %lld %lld",nigga[i].name,&nigga[i].age,&nigga[i].weight,&nigga[i].height,&nigga[i].batch,&nigga[i].p_t,&nigga[i].dot,&nigga[i].reg_no)!=EOF){
  21.       i++;
  22.     }
  23.     int size = i;
  24.     for(i = 0; i < size; ++i){
  25.       printf("%s %d %f %f %d %lld %lld %lld\n",nigga[i].name,nigga[i].age,nigga[i].weight,nigga[i].height,nigga[i].batch,nigga[i].p_t,nigga[i].dot,nigga[i].reg_no);
  26.     }
  27.     return 0;
  28. }
  29.  
  30. //asd 2 2.2 2.2 2 12 12 12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement