🔒 Closed Help

Status
Not open for further replies.

cookiedonut

Enthusiast
1662168512004.webp

C:
#include <stdio.h>
#define size 10

int main()
{
   int numbers[size];
   double grade[10];
   double grade1=0;
   double grade2=0;
   double grade3=0;
   double highPerformance;
   double lowPerformance;
  
       printf("Enter the final grade of a student: ");
    scanf("%d", grade);
   for(int i=0;i<10;i++)
   {
          
       if(grade[i]>=1.0&&grade[i]<=1.9)
       {
           grade1++;
       }
       if(grade[i]>=2.0&&grade[i]<=2.9)
       {
           grade2++;
       }
       if(grade[i]>=3.0)
       {
           grade3++;
       }
   }
   printf("1-1.9 = ", grade1);
   printf("2-2.9 = ", grade2);
   printf("3-3.0 = ", grade3);
   if(grade1+grade2>=7)
   {
       printf("High performance level");
   }
   else
   {
       printf("Low performance level");
   }
}



nalilito na ako anong kulang
 
Code:
for(int i=0; i<10; i++){
  printf("Enter the final grade of a student: ");
  scanf("%d", grade[i]);
}
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 511
    Views
  • 4
    Participants
Last reply from:
vhin le

Trending Topics

Online now

Members online
1,103
Guests online
3,321
Total visitors
4,424

Forum statistics

Threads
2,278,156
Posts
28,981,276
Members
1,228,248
Latest member
Taguroooo
Back
Top