You are not logged in.

#1 2010-03-01 01:16:26

etereo
Member
Registered: 2009-03-23
Posts: 33

calculator for grades

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

#2 2010-03-01 01:17:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,404
Website

Re: calculator for grades

This sounds very much like a school assignment to me:
http://wiki.archlinux.org/index.php/For … e#Homework

Closing...

Offline

Board footer

Powered by FluxBB