How to do it~~
eg. input 79 --> output 7
9
How to do it~~
eg. input 79 --> output 7
9
Last edited by faiwong; 10-22-2001 at 02:15 AM.
u do it and u'll know how to do it.........itzz juz tt simple!!
Java ROCKZZZZ....
java.sun.com
Write once, run everywhere!!!!!
Simple as that.Code:#include <stdio.h> int main(void) { int usernum; printf("Enter a number: "); scanf("%d", &usernum); // get the number printf("You entered %d\n", usernum); // print the number return 0; }
Last edited by EvenFlow; 10-22-2001 at 06:40 PM.
Ramble on...
> scanf("%d", usernum); // get the number
You forgot the &
scanf("%d", &usernum); // get the number
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Whoops so I did! Sorry if someone tried that and it didn't work. Thanks for pointing that out Salem. I'll fix it up.
Ramble on...