DECISION CONTROL STRUCTURE

23 programming challenges to help you master the fundamentals of C LANGUAGE.

1

Write a program to enter the number from the user and check it is positive or negative or 0 (zero) ?

2

Enter a number from user and check it is odd or even ?

3

Enter a number from the user and check that it is of 1 digit or 2 digit or 3 digit or 4 digit or 5 digit ?

4

Enter a number from the user if the number is between 0 to 40 then we will print fail if the number is between 40 to 60 then we will print C grade ,if the number is between 60 to 80 than we will print B grade ,if the number is between 80 to 100 then we will print A grade and rest all number are invalid ?

5

Enter a number from the user and check it is a decimal number or not ?

6

Enter a number from the user if it is a negative then convert into positive and if it is positive then convert into negative often that print the number ?

7

Enter a character from the user and check that it is an alphabet ?

8

Enter a number from the user if the number is negative then square the number and if it is positive then increment the number 20 times ?

9

Enter the number from the user it the number is negative or positive and find out of that number ?

10

Enter two number from user and check which is the greater number and print the greater number ?

11

Enter a number from user and check it is divisible by 4 or not ?

12

Enter a four characters from users and check they are equal or not ?

13

Enter three numbers from users and tell which is greater ?

14

Enter a number from the user if the user enters 30 then print the month in which we have 30 days. If the enter 31 then print the month 31 days for 28, 29 print the month else everything is invalid ?

15

Enter one digit number from user and print in words ?

16

Enter two characters from user and check both are same or not, if not same then find out difference between them ?

17

Enter three numbers from user and which is greater ?

18

Enter two digit number from user and print it in word (like 50 will be five zero) ?

19

Enter a character from user and it is in upper case, lower case, special characters or numbers ?

20

Enter the year from user and check its leap year or not ?

21

Enter date, month, year and check it is valid date or not ?

22

Enter current date of DOB of user and find out difference ?

23

Write a program to calculate area and perimeter of rectangle ?