PLease fix my code __ #include main() { char name[50]; int grades; printf ("enteryourlastname"); scanf ("%c", &lastname); printf ("enteryourfirstname"); scanf ("%c", &firstname); printf...


PLease fix my code


__



#include





main()

    {

        char name[50];

        int grades;





        printf ("enteryourlastname");

        scanf ("%c", &lastname);

        printf  ("enteryourfirstname");

        scanf ("%c", &firstname);






        printf ("enteryourprelimgrade");

        scanf ("%d", &prelimgrade);

        printf ("enteryourmidtermgrade");

        scanf ("%d", &midtermgrade);

        printf ("enteryourfinalgrade");

        scanf ("%d", &finalgrade);





        int Average=(prelim+midterm+finals/3);



        if (grade>=75)

            printf ("Congratulations you passed the subject");

        else

            printf ("Sorry you failed the subject");


        getche();






        return 0;

    }



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here