S

@Shobh89

29.c

C
1 year ago
#include <stdio.h> float force(float); float force(float mass){ return mass *9.8; } int main() { int m=45; printf("the value of force is %f\n",force(m));

28.c

C
1 year ago
#include <stdio.h> float c2f(float); float c2f(float c){ return((9*c)/5)+32; } int main() { float c=45;

27.c

C
1 year ago
#include <stdio.h> float average(int a,int b,int c); float average(int a,int b,int c){ return(a+b+c)/3; } int main() { int a=3,b=6,c=5; printf("the average of a,b,c is %f",average(a,b,c));

27.c

C
1 year ago
#include <stdio.h> #include<math.h> int main() { int a=9087; printf("the area of square is %f\n",pow(a,2)); return 0; }

26.c

C
1 year ago
#include <stdio.h> void good_morning(); void good_afternoon(); void good_evening(); void good_morning(){ printf("good morning\n"); }

25.c

C
1 year ago
#include <stdio.h> int main() { int n = 4; int not_prime = 0; if (n == 0 || n == 1) { not_prime = 1;

25.c

C
1 year ago
#include <stdio.h> int main() { int n=10; int not_prime=0; if(n==0 || n==1){ not_prime=1; } else{

24.c

C
1 year ago
#include <stdio.h> int main() { int product=1; int n=4; for(int i =1;i<=n;i++){ product*=i; } printf("The factorial is %d",product); return 0;

23.c

C
1 year ago
#include <stdio.h> int main() { int sum=0; for(int i =1;i<=10;i++){ sum+=(8*i); } printf("The sum of first 10 natural numbers is %d",sum); return 0; }

22.c

C
1 year ago
#include <stdio.h> int main() { int sum=0; for(int i =1;i<=10;i++){ sum+=i; } printf("the sum of first 10 natural numbers is %d",sum); return 0; }

21.c

C
1 year ago
#include <stdio.h> int main() { int i=1; int sum=0; do{ sum+=i; i++; } while(i<=79); printf("the sum of first 79 natural numbers is %d",sum);

20.c

C
1 year ago
#include <stdio.h> int main() { int i=1; int sum=0; while(i<=79){ sum+=i; i++; } printf("the sum of first 79 natural numbers is %d",sum);

19.c

C
1 year ago
#include <stdio.h> int main() { int n=10; for(int i=10; i ;--i){ printf("%d*%d=%d\n",n,i,n*i); } return 0; }

18.c

C
1 year ago
#include <stdio.h> int main() { int n; scanf("%d",&n); for(int i=0; i<11 ;i++){ printf("%d*%d=%d\n",n,i,n*i); } return 0; }

17.c

C
1 year ago
#include <stdio.h> int main() { int n=6; for (int i =1; i<=n ; i++){ printf("%d\n",i); } return 0; }

16.c

C
1 year ago
#include <stdio.h> int main() { int n,i=1; scanf("%d",&n); do{ printf("%d\n",i); i++; }while(i<=n);

15.c

C
1 year ago
#include <stdio.h> int main() { int i=0; while(i<=20){ if(i>=10){ printf("the value of i is %d\n" ,i); } i++; }

14.c

C
1 year ago
#include <stdio.h> int main() { int a=9,b=89,c=4,d=78; if(a>b && a>c && a>d){ printf("The greatest of all is %d",a); } else if(b>a && b>c && b>d){ printf("The greatest of all is %d",b); }

13.c

C
1 year ago
#include <stdio.h> int main() { char ch='A'; printf("The character is %c\n",ch); printf("the value of character is %d\n",ch); if(ch>=97 && ch<=122){ printf("The character is lowercase"); }

12.c

C
1 year ago
#include <stdio.h> int main() { int year; printf("Enter year: \n"); scanf("%d",&year); if((year%4==0 && year%100==0 || year %400==0)){ printf("This is a leap year"); }