Created
April 22, 2012 06:03
-
-
Save kdmkdmkdm/2459898 to your computer and use it in GitHub Desktop.
averageCPlusPlus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// average | |
#include "stdafx.h" | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
// Declare. | |
int numOfValues = 0; | |
float zero = 0.0f; | |
cout << "Enter the number of values to average: " << endl; | |
cin >> numOfValues; | |
while(int i = 0; i <= (numOfValues - 1); ++i) | |
{ | |
cout << "[" << i << "] = "; | |
cin >> zero >> endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment