You are not logged in.
Pages: 1
Topic closed
i need help writing a program that asks the user to enter a students grades on four exams. The program should display the four grades and the average of the four grades, rounded to the nearest tenth. here is what i got so far
#include <iostream.h>
#include <iomanip.h>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
cout << setprecision(1)
<< setiosflags(ios::fixed)
<< setiosflags(ios::showpoint);
int N;
int z, y, x, w;
int ceil(sum);
float avg =(z + y + x + w) / 4;
// Input data
cout << "Enter your four (4), exam scores: ";
cin >> z >> y >> x >> w;
// Process data
sum = z + y + x + w;
avg = float(10) / N;
system("PAUSE");
return EXIT_SUCCESS;
}
just a side not its incomplete and i need help completing this program
thank you and god bless to the people that help me
Last edited by etereo (2010-03-01 01:16:51)
Offline
This sounds very much like a school assignment to me:
http://wiki.archlinux.org/index.php/For … e#Homework
Closing...
Offline
Pages: 1
Topic closed