Problem 10: Precession

Rahul got 65.00 on physics, 83.50 on mathematics, 85.75 on C programming and 67.50 on English. Now write a program to calculate the average of his marks on 4 subjects and print it up to 2 digit after the decimal point. [The result should look like: XX.XX]

5,869 total views, 2 views today

Comments

comments

6 thoughts on “Problem 10: Precession”

  1. #include
    int main()
    {
    float physics=65.00;
    float math=83.50;
    float C=85.75;
    float english=67.50;
    float avg=(physics+math+C+english)/4;

    printf(“The Avg of Rahul’s Marks: %.2f”,avg);

    return 0;
    }

  2. #include
    int main()
    {
    float p=65.00;
    float m=83.50;
    float C=85.75;
    float e=67.50;
    float avg=(p+m+C+e)/4;

    printf(“The Avg of Rahul’s Marks: %.2f”,avg);

    return 0;
    }

  3. #include
    main()
    {
    float phy=65.00,math=83.50,c=85.75,eng=67.50,avg;
    printf(“Rahul got on..Physics : 65.00\n”);
    printf(“Rahul got on..mathematics : 83.50\n”);
    printf(“Rahul got on..C programming: 85.75\n”);
    printf(“Rahul got on..English : 67.50\n”);
    avg=(phy+math+c+eng)/4;
    printf(“The Average of Rahul’s Marks is :%.2f\n”,avg);
    }

  4. #include
    int main()
    {
    float m1=65.00,m2=83.50,m3=85.75,m4=67.50,m5;
    m5=(m1+m2+m3+m4)/4;
    printf(“The average marks is %0.2f\n”,m5);
    }

  5. #include
    int main()
    {
    double p=65.00,m=83.50,c=85.75,e=67.50,average;
    average=p+m+c+e/3;
    printf(“average is :%0.2lf”,average);
    return 0;

    }

  6. #include
    int main ()
    {

    float phy=65.00, math=83.50, cProgram=85.75, eng=67.50, avg= (phy+math+cProgram+eng)/3;
    printf(“Average marks:%.2f”, avg);

    return 0;

    }

Leave a Reply

Your email address will not be published.