S

@soupra

2

C
2 years ago
#include <stdio.h> int main() { int b; scanf("%d",&b); switch(b) { case 7: printf("you got 7 cgpa"); break;

1

C
2 years ago
#include <stdio.h> int main() { char c; scanf("%c",&c); int a,b; scanf("%d",&a); scanf("%d",&b); switch (c)

square of two numbers

C
2 years ago
#include <stdio.h> int main() { float a,b; scanf("%f",a); scanf("%f",b); b=a*a; if(b<10) { printf("the square of this number is %f",b);

50.50

C
2 years ago
#include <stdio.h> int main() { float a,b,c; a=50.50; b=2.00; c=a/b; printf("the division of 50.50 and 2.00 is %f",c); return 0;

product of two float numbers

C
2 years ago
#include <stdio.h> int main() { float a,b,c; scanf("%f",&a); scanf("%f",&b); scanf("%f",&c); c=a*b; printf("product of a and b is %f",c);

sum of 10.257 and 2589.257

C
2 years ago
#include <stdio.h> int main() { float a,b,c,sum; a=10.257; b=2589.257; c=18; sum=a+b+c; scanf("%f",&sum);

number greater than or equal to

C
2 years ago
#include <stdio.h> int main() { int a,b; scanf("%d",&a); scanf("%d",&b); if (a>b) { printf("a is greater than b\n");

marriage

C
2 years ago
#include <stdio.h> int main() { int b,g; scanf("%d",&b); scanf("%d",&g); if(b>21 & g>18) { printf ("they both are eligible for marriage");

accepting amount

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a>=1000) { printf("10 percent discount obtained\n"); }

pass fail

C
2 years ago
#include <stdio.h> int main() { int a,b,c,avg; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a>35,b>35,c>35) { printf("pass\n");

voting eligiblity

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a>=18) { printf("this person is eligible to vote"); }

positive negative or zero

C
2 years ago
#include <stdio.h> int main() { float a; scanf("%f",&a); if(a>0) { printf("a is a positive num"); }

divisible by 7

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a%7==0) { printf("a is divisible by 7"); }

grades

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a>85) { printf("A grade\n"); }

even number odd number

C
2 years ago
#include <stdio.h> int main() { int a; scanf("%d",&a); if(a%2==0) { printf("a is an even number"); }

three numbers

C
2 years ago
#include <stdio.h> int main() { int a,b,c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a>b & a>c) {

two numbers

C
2 years ago
#include <stdio.h> int main() { int a,b; scanf("%d",&a); scanf("%d",&b); if(a>b) { printf("if a is greater than b");

quotient and remainder of two numbers

C
2 years ago
#include <stdio.h> main() { int num1,num2,q,rem; printf("enter first number\n"); scanf("%d",&num1); printf("enter second number\n"); scanf("%d",&num2); q=num1/num2; printf("the q of two numbers %d\n",q);

avg of two numbers

C
2 years ago
#include <stdio.h> main() { float num1,num2,avg; printf("enter first float number\n"); scanf("%f",&num1); printf("enter second float number\n"); scanf("%f",&num2); avg=(num1+num2)/2; printf("the avg of two float numbers %f",avg);

product of two float numbers

C
2 years ago
#include <stdio.h> main() { float num1,num2,product; printf("enter first float number\n"); scanf("%f",&num1); printf("enter second float number\n"); scanf("%f",&num2); product=num1*num2; printf("the product of two float numbers %f",product);