C program to check whether triangle is equilateral, scalene or isosceles

Write a C program to input sides of a triangle and check whether a triangle is equilateral, scalene or isosceles triangle using if else. How to check whether a triangle is equilateral, scalene or isosceles triangle in C programming. Logic to classify triangles as equilateral, scalene or isosceles triangle if sides are given in C program.

Example
Input

Input first side: 30
Input second side: 30
Input third side: 30

Output

Triangle is equilateral triangle

Read more

C program to check whether triangle is valid or not if sides are given

Write a C program to input side of a triangle and check whether triangle is valid or not using if else. How to check whether a triangle can be formed or not if sides of triangle is given using if else in C programming. Logic to check triangle validity if sides are given in C program.

Example
Input

Input first side: 7
Input second side: 10
Input third side: 5

Output

Triangle is valid

Read more

C program to check whether triangle is valid or not if angles are given

Write a C program to check whether a triangle is valid or not if angles are given using if else. How to check whether a triangle can be formed or not, if its angles are given using if else in C programming. Logic to check triangle validity if angles are given in C program.

Example
Input 

Input first angle: 60
Input second angle: 30
Input third angle: 90

Output

The triangle is valid

Read more

C program to find number of days in month

Write a C program to enter month number between(1-12) and print number of days in month using if else. How to print number of days in a given month using if else in C programming. Logic to find number of days in a month in C program.

Example
Input

Enter month number: 1

Output

It contains 31 days.

Read more

C program to enter week number and print day of week

Write a C program to input week number(1-7) and print the corresponding day of week name using if else. How to print day of week using if else in C programming. Logic to convert week number to day of week in C programming.

Example
Input

Input week number: 1

Output

Monday

Read more

C program to check whether a character is alphabet, digit or special character

Write a C program to input a character from user and check whether given character is alphabet, digit or special character using if else. How to check if a character is alphabet, digits or any other special character using if else in C programming. Logic to check alphabet, digit or special character in C programming.

Example
Input

Input any character: 3

Output

3 is digit

Read more

C program to check vowel or consonant

Write a C program to check whether an alphabet is vowel or consonant using if else. How to check vowels and consonants using if else in C programming. C Program to input a character from user and check whether it is vowel or consonant. Logic to check vowel or consonant in C programming.

Example
Input

Input character: a

Output

'a' is vowel

Read more

What is ASCII character code?

ASCII stands for American Standard Code for Information Interchange. It was developed by ANSI (American National Standards Institute). It is a set of decimal coded value for all basic printable and non-printable characters. For example – A is represented as 65 in ASCII standard. Similarly, there exists an integer value to represent every printable and … Read more

C program to check whether a character is alphabet or not

Write a C program to input a character from user and check whether the given character is alphabet or not using if else. How to check whether a character is alphabet or not in C programming. Logic to check if a character is alphabet or not in C program.

Example
Input

Input character: a

Output

'a' is alphabet

Read more