Area of rectangle Get link Facebook X Pinterest Email Other Apps Code for area of rectangle #include<stdio.h> #include<conio.h> void main() { int a,l,b; printf("Enter length and breadth"); scanf("%d%d",&l,&b); a=l*b; printf("Area=%d",a); getch(); } Output Get link Facebook X Pinterest Email Other Apps Comments
Code for pattern 1 Code for Pattern 1 *** *** *** #include<stdio.h> #include<conio.h> void main() { int i,j; for(i=1;i<=3;i++) { for(j=1;j<=3;j++) { printf("*"); } printf("\n"); } getch(); } Output Read more
Code for sum of 1 to 10 digits(Using for loop) Code for sum of 1 to 10 digits(Using for loop) #include<stdio.h> #include<conio.h> void main() { int i,s=0; for(i=1;i<=10;i++) { s=s+i; } printf("sum=%d",s); getch(); } Output Read more
Code for pattern 4 Code for pattern 4 1 12 123 1234 #include<stdio.h> #include<conio.h> void main() { int i,j; for(i=1;i<=4;i++) { for(j=1;j<=i;j++) { printf("%d",j); } printf("\n"); } getch(); } Output Read more
Comments
Post a Comment