A

@Athul

program to find eligibility to vote using switch statement

C
3 years ago
#include <stdio.h> int main() { int age; printf("Enter the age of candidate : "); scanf("%d", &age); switch (age){ case 18: printf("\nYou are not Elegible for Voting");

program to find the month

C
3 years ago
#include<stdio.h> void main() { int choise; printf("\n enter the month number : "); scanf("%d",&choise); switch(choise) { case 1: printf("Month is : January");

alphabet

C
3 years ago
#include <stdio.h> #include<ctype.h> int main(){ char num; scanf("%c",&num); printf("enter the character ;%c\n",num); if(isdigit(num)) { printf("it is a number\n"); }

100

C
3 years ago
#include <stdio.h> int main() { int num; printf("Enter a integer\n"); scanf("%d",&num); if(num>100) { printf("The integer is greater than 100");}

squaring

C
3 years ago
#include <stdio.h> int main() { int num,product; printf("Enter a integer\n"); scanf("%d",&num); if(num<10) { product=num*num;

division of two float numbers

C
3 years ago
#include <stdio.h> main() { float num1 , num2,quotient; printf("Enter the first float number\n"); scanf("%f",&num1 ); printf(" Enter the second float number\n"); scanf("%f" ,& num2 ); quotient= num1/num2;

quotient 25.25

C
3 years ago
#include <stdio.h> main() { float num1,num2,quotient; num1=50.50;num2=2.00; quotient=num1/num2; printf("quotient of two num1 and num2=%f",quotient); }

product of 2 float numbers

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

three float numbers

C
3 years ago
#include <stdio.h> int main() { float a,b,d,sum; a=10.257;b=2589.257;d=18; sum=a+b+d; printf("sum of three float numbers=%f",sum); }

discount problem

C
3 years ago
#include <stdio.h> int main() { int amt,t1,t2,d1,d2; printf("enter the amount:%d\n",amt); scanf("%d",&amt); if (amt>=1000) { d1 = 0.1*amt;

comparing two numbers

C
3 years ago
#include <stdio.h> int main() { int num1 , num2; printf("Enter the two numbers num1 and num2:\n"); scanf("%d%d",&num1,&num2); if (num1 > num2) { printf("num1 is greater than num2 ");

program to check students acquired class

C
3 years ago
#include <stdio.h> int main() { int phy,che,bio, marks; printf("Input the marks of Physics, Chemistry and biology : \n"); scanf("%d%d%d",&phy,&che,&bio); marks = phy + che + bio; if (marks >= 60) { printf("The stude

eligibility to vote

C
3 years ago
#include <stdio.h> int main() { int age ; printf("Enter the age :\n"); scanf("%d",&age ); if (age > 18) {

even or odd

C
3 years ago
#include <stdio.h> int main() { int num; printf("Enter the number:\n"); scanf("%d",&num); if(num % 2 == 0) {

positive negative or zero

C
3 years ago
#include <stdio.h> int main() { int num; printf("Enter the number:\n"); scanf("%d",&num); if(num > 0) {

multiple of 7

C
3 years ago
#include <stdio.h> int main() { int n; printf("Enter the number :\n"); scanf("%d",&n); if(n % 7 == 0) { printf("the given number is a multiple of 7");

program to print a day of the week

C
3 years ago
#include <stdio.h> int main() { int week; /* Input week number from user */ printf("Enter week number(1-7): "); scanf("%d", &week);

to check marital status

C
3 years ago
#include<stdio.h> int main() { int age; char MaritalStatus,Gender; printf("Enter MaritalStatus, Gender, Age : (e.g. m,f,25) : "); scanf("%c,%c,%d",&MaritalStatus,&Gender,&age); if(MaritalStatus=='m') { printf("You can not marry

program to check whether a person can vote or not

C
3 years ago
#include <stdio.h> int main() { int age; printf("Enter age : "); scanf("%d", &age);

program to check whether a number is even or odd

C
3 years ago
#include <stdio.h> int main() { int num; printf("Enter an integer: "); scanf("%d", &num); // true if num is perfectly divisible by 2 if(num % 2 == 0) printf("%d is even.", num); else