Sunday, December 28, 2014

Datatype(1)

1:
 #include <stdio.h>  
/***Datatype(1)

 int main()  
 {  
     int a,b,sum;  
    a=3,b=6;
    sum = a + b;  
    printf(" %d\n", sum);  
     return 0;  
 }  

output: 9
/***guys /n using for new line***/
/***here %d is an identifier of int***/

2:
#include <stdio.h>
/***Datatype(1)
int main()
{
int a,b;
a=6;
b=6+a;
printf("%d\n",b);
return 0;
}

output: 12

3:
#include <stdio.h>
/***Datatype(1)
int main()
{
int a=5,b=6,sum;
sum=a*b;
printf("The multiplication is:%d\n",sum);
return 0;
}

output: 30

No comments:

Post a Comment