Hi guys, im new to programming and new to the boards, so bear with me for having such a stupid question to ask of you. Will be taking a programming course in university next year so thought i'd get a head start Anyway....
I've read about printing text, receiving inputs from the user, loops, functions etc etc.... so i thought i'd get round to making a program of my own. I thought id code it bit by bit to make sure i had the syntax right, but straight away i get errors. This is the code:
I get two errors:Code:#include <stdio.h> #include <stdlib.h> int num; int main() { printf ("Enter the first number: "); scanf ("%d", &num); printf (num); return (0); }
- Cannot convert 'Int' to 'const char*' in function main()
- Type mismatch in parameter '_format' <wanted 'const char*', got 'int' in function main()
Any ideas? i've looked through the FAQ on the site, and a couple of others and the code looks ok to me, am i missing something obvious? thanks in advance