Machine Problem
Write a program that will ask the student to give the prelim, midterm, and final grade, and then the program will compute the average grade of the student and display the result on the screen.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
You can buy my C++ book online at
https://www.mindshaperspublishing.com/product/beginners-guide-to-c-programming/
You can buy my book in introduction to computer networking at
https://www.unlimitedbooksph.com/product-page/introduction-to-computer-networking
Want to support my channel?
GCash Account
Jake Pomperada
09173084360
Paypal
https://paypal.me/jakerpomperada
Patreon
https://www.patreon.com/jakerpomperada
Thank you very much for your support.
Program Listing
/* grade.c
Author : Jake Rodriguez Pomperada,BSCS,MAED-IT
Date : November 13, 2018 Tuesday 9:44 PM
Location : Bacolod City, Negros Occidental
Tool : Dev C++ Version 5.11
Website : http://www.jakerpomperada.com
Email : jakerpomperada@jakerpomperada.com
*/
#include <stdio.h>
int main()
{
float solve_average=0.00;
float prelim=0.00,midterm=0.00,final=0.00;
system("COLOR F0");
printf("\n\n");
printf("\tStudent Grade Calculator in C");
printf("\n\n");
printf("\tGive Prelim Grade : ");
scanf("%f",&prelim);
printf("\tGive Midterm Grade : ");
scanf("%f",&midterm);
printf("\tGive Final Grade : ");
scanf("%f",&final);
solve_average =(prelim+midterm+final)/3;
printf("\n\n");
printf("\t===== DISPLAY RESULTS =====");
printf("\n\n");
printf("\tThe student average grade is %.0f.",solve_average);
printf("\n\n");
printf("\tEND OF PROGRAM");
printf("\n\n");
}
No comments:
Post a Comment