Problem: Write a pseudocode program, then a C++ program that uses a while statement to determine and print the largest number of 10 numbers input by the user. Your program should use three variables, as follows:
counter
number
largest
Here is the program I wrote:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int counter = 1;
int number =0;
int largest = 0;
cout << "\nThe largest number you have entered is " << largest << "." << endl;
return 0;
}
MY PROBLEM is that it's not printing the largest number. Instead it's printing 0, which is the number I have declared for the variable largest. Is something wrong with my IF statement???