its just a simple exe for finding the average age of 5 people.
here's the source
Code: Select all
//1st program written PinPoint from memory for the purpose of finding
//the average age of 5 people
#include <iostream>
#include <cstdio>
int main()
{
int Age1, Age2, Age3, Age4, Age5;
int AverageAge;
std::cout << " Age of person 1 = "; //promt user to input age
std::cin >> Age1;
std::cout << " Age of person 2 = ";
std::cin >> Age2;
std::cout << " Age of person 3 = ";
std::cin >> Age3;
std::cout << " Age of person 4 = ";
std::cin >> Age4;
std::cout << " Age of person 5 = ";
std::cin >> Age5;
AverageAge = (Age1+Age2+Age3+Age4+Age5)/5;
std::cout << std::endl
<< "AverageAge is " << AverageAge;
getchar();
<< std::endl;
std::cout << std::endl
<< "Press Enter to exit...";
getchar();
return 0;
}