Skip to content

Instantly share code, notes, and snippets.

@programmingfaster0226
Created June 18, 2018 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmingfaster0226/012b003a9b44da088962b9c2984ebe42 to your computer and use it in GitHub Desktop.
Save programmingfaster0226/012b003a9b44da088962b9c2984ebe42 to your computer and use it in GitHub Desktop.
programmingfaster.com
#include<stdio.h>
#include<conio.h>
void main()
{
char name[20];
float math,phy,chem,bio,nepali,comp,hotelMgmt,total,percent;
printf("enter the name of the student");
scanf("%s",name);
printf("enter marks in different seven subjects:");
scanf("%f%f%f%f%f%f%f",&math,&phy,&chem,&bio,&nepali,&comp,&hotelMgmt);
total=math+phy+chem+bio+nepali+comp+hotelMgmt;
percent=total/7;
printf("\n the percentage of %s is :%.2f",name,percent);
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment