Help please!

Hi, my name is Jenson. I'm 15 years old and just getting into c programming.
I've already made a few simple applications that pop up text when activated, but I'm stuck on another program.

When I run it all that comes up is a=5 even though it is supposed to add the numbers together. Please keep in Mind I'm very new to this.

1
2
3
4
5
6
7
8
9
10
11
12
13
 #include <studio.h> 
Int main ()
{
Printf("a=5:");
Scanf("%d", &a);
 
Printf("b=7:");
Scanf("%d",&b);
C=a+b;
Printf("%d + %d\n, a, b, c");
Return 0;
}
[code]



[/code]
closed account (Dy7SLyTq)
look at line 1 and 10
You do have a 'u' in your header and also in line 10 you're sending 3 numbers by value where you should only be sending 2 (and I'm not sure if it has to be by reference or not)
closed account (Dy7SLyTq)
you're sending 3 numbers by value where you should only be sending 2 (and I'm not sure if it has to be by reference or not)
it doesnt have to be reference thats only for scanf. you didnt declare the variables and i was more talking about the " placement on line 10
Wow, I didn't even notice that the values aren't declared XD
Been a while since I've had to scan for newbie mistakes like this
Topic archived. No new replies allowed.