THEORY
The stdio.h denotes the C library that we have connected this program to, which contains the code to execute the printf command and display results. The printf keyword is used to display content on the screen. It can be used to display strings, numbers as well as values of variables, etc. The scanf command is used to read user input and is used to accept the value of the circle radius from the user. A condion is used to check whether the number is larger or not. The condition operator used here is the ternary operator.
Its syntax is: (condition)?true statement:false statement;
Its syntax is: (condition)?true statement:false statement;
FLOWCHART
Algorithm
Step 1: Start
Step 2: Read a
Step 3: If a%2=0 then follow step 4 else step 5
Step 4: Print a is even
Step 5: Print a is odd
Step 6: Stop
C Source Code
//Written By DataVoid Team
#include<stdio.h>
void main()
{
int a;
printf("\n Enter a number:");
scanf("%d",a);
(a%2=0)?printf("\n The number is even"):printf("\n The number is odd");
}
Algorithm
Step 1: Start
Step 2: Read a
Step 3: If a%2=0 then follow step 4 else step 5
Step 4: Print a is even
Step 5: Print a is odd
Step 6: Stop
C Source Code
//Written By DataVoid Team
#include<stdio.h>
void main()
{
int a;
printf("\n Enter a number:");
scanf("%d",a);
(a%2=0)?printf("\n The number is even"):printf("\n The number is odd");
}