fork download
  1. #include<stdio.h>
  2. #include<conio.h>
  3. main()
  4. {
  5. char name [50],id[10];
  6. int s1,s2,s3,total;
  7. printf ("Enter your Name: ");
  8. scanf("%s", &name);
  9. printf("Enter your ID Student: ");
  10. scanf("%s", &id);
  11. printf("Enter your Score (50 point):");
  12. scanf("%d",&s1);
  13. printf("Enter your Test (30 point):");
  14. scanf("%d",&s2);
  15. printf("Enter your Affective Score (20 point):");
  16. scanf("%d",&s3);
  17. total-s1+s2+s3;
  18. printf("%s id %s total score %d", name, id, total);
  19. if (total<=49)
  20. printf("Grad 0");
  21. if(total<-59)
  22. printf("Grad 1");
  23. if (total<-69)
  24. printf("Grad 2");
  25. if(total<=79)
  26. printf("Grad 3");
  27. if (total<=100)
  28. printf("Grad 4");
  29. /**/
  30. }
Success #stdin #stdout 0.04s 25632KB
stdin
Standard input is empty
stdout
#include<stdio.h>
#include<conio.h>
main()
{
    char name [50],id[10];
    int s1,s2,s3,total;
    printf ("Enter your Name: ");
    scanf("%s", &name);
    printf("Enter your ID Student: ");
    scanf("%s", &id);
    printf("Enter your Score (50 point):");
    scanf("%d",&s1);
    printf("Enter your Test (30 point):");
    scanf("%d",&s2);
    printf("Enter your Affective Score (20 point):");
    scanf("%d",&s3);
    total-s1+s2+s3;
    printf("%s id %s total score %d", name, id, total);
    if (total<=49)
    printf("Grad 0");
    if(total<-59)
    printf("Grad 1");
    if (total<-69)
    printf("Grad 2");
    if(total<=79)
    printf("Grad 3");
    if (total<=100)
    printf("Grad 4");
    /**/
}