Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: Amna Alshaerr
- Department key skills
- */
- #include <iostream>
- using namespace std;
- int main () {
- double mark1, mark2, mark3, total, avrege;
- cout << "this program will compute for the total and average of three (3) marks.";
- cout << " /n";
- //input
- cout << "enter mark1: /n";
- cin >> mark1;
- cout << "enter mark2: /n";
- cin >> mark2;
- cout << "enter mark3: /n";
- cin >> mark3;
- //process
- total = mark1 + mark2 + mark3;
- average = total/3;
- //output
- cout << "/n-------------------------------------------------";
- cout << "/n";
- cout << "your total is:";
- cout << total;
- cout << "/n-------------------------------------------------";
- cout << "/n";
- cout << "/n-------------------------------------------------";
- cout << "your average is:";
- cout << average;
- cout << "/n-------------------------------------------------";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement