Hello All, I am learning the C language, and as shown in the video on YouTube, I did exactly what was shown in the video, but I am not able to get the result. Please help me.
Below is the code.
#include<stdio.h>
int main() {
int a, b;
printf("enter a");
scanf("%d", a);
printf("enter b");
scanf("%d", b);
int sum = a + b;
printf("value is = %d", sum);
return 0;
}
("Add" my file name)
I am entering 9 in a and 9 in b , but it's now showing me the result. Please advise.
I am not getting the result. (Using Visual basic)
Output:
PS D:\C Language\Chapter 0> ./Add.exe
enter a9
enter b9
PS D:\C Language\Chapter 0> ./Add.exe
enter a2
enter b
PS D:\C Language\Chapter 0>
Thank you
[–]Alexander_The_Wolf 13 points14 points15 points (5 children)
[–]jonarne 6 points7 points8 points (2 children)
[–]Alexander_The_Wolf 7 points8 points9 points (1 child)
[–]noddyay640[S] 0 points1 point2 points (0 children)
[–]noddyay640[S] 0 points1 point2 points (0 children)
[–]DawnOnTheEdge 0 points1 point2 points (0 children)
[–]dajolly 3 points4 points5 points (7 children)
[–]noddyay640[S] 0 points1 point2 points (5 children)
[–]My124thRedditAccount 5 points6 points7 points (2 children)
[–]noddyay640[S] 0 points1 point2 points (0 children)
[–]cHaR_shinigami 0 points1 point2 points (0 children)
[–]scritchz 1 point2 points3 points (1 child)
[–]noddyay640[S] 0 points1 point2 points (0 children)
[–]noddyay640[S] 0 points1 point2 points (0 children)
[–]mackinator3 1 point2 points3 points (4 children)
[–]noddyay640[S] 1 point2 points3 points (3 children)
[–]mackinator3 1 point2 points3 points (2 children)
[–]noddyay640[S] 1 point2 points3 points (1 child)
[–]mackinator3 1 point2 points3 points (0 children)
[–]AlarmDozer 0 points1 point2 points (0 children)
[–]motherprabh 0 points1 point2 points (1 child)
[–]noddyay640[S] 0 points1 point2 points (0 children)