im starting to learn from the most basic 10 line progams(meaning 10 or less lines of code) to the most complex programs like i shuld but i cant even get a very basic code to work so in this topic (this same topic every time) im gonna post my codes and see what im doing wrong
so heres #1 its supposed to multiply number "a" by number "b" then print the output... but instead it crashes after the first number
please dont just hand me the edited code..... explane how i can avoid the mistake the next timeCode:#include<stdio.h>
int main(void){
printf("enter a number hit return then repeat.\n");
int a;
a = scanf("%d" ,a);
int b;
b = scanf("%d" ,b);
printf("%d",a * b);
getchar();
getchar();
return 0;
}
EDIT: im sorry for my last topic i stated 2 months ago i was so into the game that i didnt care at all but now ive seen how bad i was and about a month ago i quit the game perminantly and im trying to get a real life