|
-
Jan 31st, 2001, 09:39 PM
#1
Thread Starter
Fanatic Member
I was wondering if anyone can help, because i cn get it to work in java but not in C++.
#include <iostream.h>
void main()
{
int input;
cout<<"Type in a number\n";
cin>>input;
for (int i = 1; i <= input; i++)
{
input = i * input;
}
cout<<input
}
like i said, i got it to work injava, but whenever i type something in here i get something totally different (like -1899959296 for 5 when it should be 120).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|