SHARE
TWEET

Untitled

a guest Jun 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.    #include <stdlib.h>
  3.    #include <string.h>
  4.    #include <Math.h>
  5.  
  6.   typedef struct Student{
  7.  
  8. char name [20] ;
  9.  
  10. int grade ;
  11.  
  12. int number ;
  13.  
  14.  
  15.  }Student;
  16.  
  17.  
  18.  typedef struct Class{
  19.  
  20. char className[20] ;
  21.  
  22. Student Students[30] ;
  23.  
  24.  
  25.  }Class;  
  26.  
  27. double calculateAverageGrade(I want to pass the Students[30] array here ) {
  28.  
  29. int i ;
  30.  
  31. int sum = 0 ;
  32. for(i=0;i<3;i++) {
  33.  
  34.  
  35.  }
  36.  
  37. return sum/3 ;
  38.  
  39.   }  
  40.  
  41.     int main() {
  42.  
  43.  
  44. Student s1 ={"John",75,758} ;
  45.  
  46. Student s2 = {"Jack",85,123} ;
  47.  
  48. Student s3 = {"Lisandra",50,321} ;
  49.  
  50. Class c1 ={''} ;
  51.  
  52. strcpy(c1.className,"Physics") ;
  53.  
  54. c1.Students[0] = s1 ;
  55.  
  56. c1.Students[1] = s2 ;
  57.  
  58. c1.Students[2] = s3 ;
  59.  
  60.  
  61. calculateAverageGrade(needs to take Students[30] array);
  62.  
  63.  
  64.  
  65.  
  66.  
  67. return 0 ;
  68. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top