User input and addition of two numbers

int It is used for defining the variables in integer value.

Printf("****") It means print my statement on console exactly it is.

scanf("**",**) It is a function in <stdio.h> which helps us to takes the user input into the program.

&(am percent) It is defined as the address of declared variables. Ex- (&a) (&b)

\n It means new line character, It breaks the statement from a new line.

move on to code:👇

#include <stdio.h>

int main()
{
    int ab;
    printf("Enter number a\n");
    scanf("%d", &a);
    
    printf("Enter number b\n");
    scanf("%d", &b);
    
    printf("Your added number is here: %d \n"a+b);
    return 0;
}

Comments

Popular Posts