3/17/21

C Program to find the average marks of 5 subjects -- C Programming


Program To Find Average of 5 Subjects


 #include<stdio.h>

int main()

{

int a, b, c, d, e, sum;

float ave;

printf("Enter Marks of Subjects 1 =");

scanf("%d",&a);

printf("Enter Marks of Subjects 2 =");

scanf("%d",&b);

printf("Enter Marks of Subjects 3 =");

scanf("%d",&c);

printf("Enter Marks of Subjects 4 =");

scanf("%d",&d);

printf("Enter Marks of Subjects 5 =");

scanf("%d",&e);

sum = a+b+c+d+e;

ave = sum/5;

printf("\nSum of the Marks are :- %d ", sum);

printf("Average of the Marks are :- %f", ave);

getch();

}

Output :- 





"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    1 comment:

    1. I wanna thanks to a great extent for providing such informative and qualitative material therefore often.
      professional web design agency

      ReplyDelete

    Follow on Twitter

    Linkedin

    Categories

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.