Forum: C++ Feb 26th, 2008 |
| Replies: 13 Views: 1,455 (ummm.... i wasn't the one having the problem with the code, i know for a fact that the code i posted works... i was posting it so sfurlow2 could see how to do it, else i wouldn't have commented it... |
Forum: C++ Feb 26th, 2008 |
| Replies: 13 Views: 1,455 ok, should more look something like this:
#include <iostream> //needed for cout and cin
using namespace std; //also needed...
int main(){
int counter = 0;
int highest = 0; |
Forum: C++ Feb 26th, 2008 |
| Replies: 13 Views: 1,455 by having a variable ( i.e. int highest; ) and using an if statement after the cin to check if it is higher or lower than the one they just input, then keep the higher of the two stored there.... |