This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
int a,b,sum; | |
a=2,b=3; | |
sum=a+b; | |
printf("the sum of a&b is%d\n",sum); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
char char1='X'; | |
char char2='M'; | |
char char3='L'; | |
printf("\n the reverse of %c%c%c is %c%c%c\n", char1,char2,char3,char3,char2,char1); | |
getch(); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
printf("Addition of 6 and 9 is %d", 6 + 9); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
main() | |
{ | |
printf("\n\n\n######\n"); | |
printf("#\n"); | |
printf("#\n"); | |
printf("#####\n"); | |
printf("#\n"); | |
printf("#\n"); | |
printf("#\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(int argc, char const *argv[]) | |
{ | |
/* c program to implement calculater fetures*/ | |
int a,b,add,sub,mul,div; | |
a=2,b=2; | |
printf("calculater fetures:\n"); | |
add=a+b; | |
sub=a-b; | |
mul=a*b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(int argc, char const *argv[]) | |
{ /* sud1*/ | |
int i,n; | |
n=9; | |
printf("\enter the num\n"); | |
scanf("%d",&n); | |
for(i=1;i<=10;i++) | |
{ | |
printf("\n%d*%d=%d",n,i,n*i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int days,weeks,years; | |
days=1329; | |
years=(days/365); | |
printf("\n years:%d \n",years); | |
weeks=(days%365)/7; | |
printf("\n weeks:%d \n",weeks); | |
days=days-((years365)+(weeks7)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
float x,y,z,perimeter; | |
printf("enter the values of x, y, z:"); | |
scanf("%f %f %f",&x, &y, &z); | |
if(x < (y + z) && y < (x + z) && z < (x + y)) | |
{ | |
perimeter = x + y + z; | |
printf("The perimeter of triangle = %f\n",perimeter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int a, b; | |
printf("The values of a and b are:"); | |
scanf("%d %d", &a, &b); | |
if(a % b == 0) | |
{ | |
printf("Multiplied"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int x; | |
printf("Read the integer from keyboard: "); | |
scanf("%d", &x); | |
printf("Integer value = %d", x); | |
x <<= 2; | |
printf("The left shifted data is %d", x); | |
return 0; |
OlderNewer