C - Language Theory
Input :
- scanf("%d",&a);
- Gets an integer value from the user and stores it under the name "a".
- printf("%d",a);
- prints the value present in variable a on the screen.
Syntax |
---|
#include<stdio.h> void main() { int a,b,c; printf("Enter a,b values"); scanf("%d%d",&a,&b); c=a+b; printf("Addition=%d",c); return 0; } |
Output :
Syntax |
---|
#include <stdio.h> int main() { printf("Hello"); return 0; } |