i need samples on calculating average the average of "C Program=50" "Html5=70" "DreamWaver=70" "SQL Server=80"

Recommended Answers

All 6 Replies

How is this different from your other request? We don't provide code. Show your code if you have problems, and people here will help you.

#include <stdio.h>
#include <stdlib.h>
  int main()
  {
      aptech();
      ola();
  }



  void aptech()
  {
printf("APTECH COMPUTER EDUCATION\n");
printf("\n\t*****STUDENT REGISTRATION FORM*****\t ");
printf("\n\t||||Unleash Your Potential||||\t ");
printf("\n\t--->Student Name<---\t^_^FABUYI LAOLU^_^\t");
printf("\n\t--->Student ID<---\t*_^   199619   ^_*\t");
printf("\n\t*_*Score in 4 topics*_*\t");
return 0;
}
void ola()
{
     /*code to calculate the
       average of four Topics*/
int Cprogram,SQLs,HTML,Dreamwaver,Average;
printf("*\n The Scores for 4 topics: \n*");
printf("*\n Enter the Score for Cprogram:");
scanf("%d",&Cprogram);
printf("*\n Enter the Score for SQLs:");
scanf("%d",&SQLs);
printf("*\n Enter the Score for HTML:");
scanf("%d",&HTML);
printf("*\n Enter the Score of Dreamwaver:");
scanf("%d",&Dreamwaver);
Average=(Cprogram+SQLs+HTML+Dreamwaver)/4;
printf("\nThe Average Score= %d",Average);
return 0;

}

Great, and your question or problem is?

when i create it it keeps on scrolling up and down

Use a system("pause"), getch() or getchar() before line 37 return 0; depending on your C installation. to keep the terminal on screen.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.