V

@vanshu_179

area of circle

C
3 years ago
#include <stdio.h> int main() { float radius, area; printf("enter the radius \n"); scanf("%f", &radius); area = 3.14 * radius * radius; printf(" area is : %f",area); return 0; }

print the smallest no. of the two

C
3 years ago
#include <stdio.h> int main() { int a, b ,small; printf("enter a number \n"); scanf("%d %d", &a , &b); { if ( a < b) small = a ; else small = b; }

given character is digit or not

C
3 years ago
#include <stdio.h> int main () { char ch; printf("enter a character \n"); scanf("%c", &ch); if (ch>='0' && ch<='9') { printf("number is digit"); } else

hello vanshu

C
3 years ago
#include <stdio.h> int main() { printf("Hello vanshu! \n"); return 0; }

take a no. n from user and output its cube (n*n*n)

C
3 years ago
#include <stdio.h> int main() { int n; printf("enter the value of n: /n"); scanf("%d",&n); printf("%d", n * n * n ); return 0; }

area of cube

C
3 years ago
#include <stdio.h> int main() { int side , area; printf("enter the value of side : \n"); scanf("%d", &side); area = side * side * side; printf("%d", area); return 0; }

perimeter of rectangle

C
3 years ago
#include <stdio.h> int main() { int length , breadth , perimeter; printf("enter the value of length : \n"); scanf("%d", &length); printf("enter the value of breadth : \n"); scanf("%d", &breadth); perimeter = 2 * ( length + breadth ); printf( "%d", perimeter); return 0;

average of 3 no.

C
3 years ago
#include <stdio.h> int main() { int a ,b ,c, avg; printf ("enter the three no.: \n "); scanf ("%d %d %d", &a, &b, &c); avg = (a + b + c)/3; printf("%d",avg); return 0; }