Code:
Output:
note:
int a=4; - 'int' type variable 'a'. it value is '4'but sometime we want to get value from user so
int a;
then get user input from 'scanf'
Code:
Output:
note:
if you want to print 2 variable-printf("%d%d",a,b);if you want to scan 2 variable -scanf("%d%d",&a,&b);
Code:
Output:
note:
if you want to get different type inputfirst get 'charter' variable from user
otherwise there is a error
No comments:
Post a Comment