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;
FLOWCHART
Algorithm
Step 1: Start
Step 2: Read a,b
Step 3: If a>b then follow step 4 else step 5
Step 4: Print a is largest
Step 5: Print b is largest
Step 6: Stop
C Source Code
//Written By DataVoid Team
#include<stdio.h>
void main()
{
int a,b;
printf("\n Enter two numbers:");
scanf("%d%d",a,b);
(a>b)?printf("\n The largest is %d",a):printf("\n The largest is %d",b);
}
Algorithm
Step 1: Start
Step 2: Read a,b
Step 3: If a>b then follow step 4 else step 5
Step 4: Print a is largest
Step 5: Print b is largest
Step 6: Stop
C Source Code
//Written By DataVoid Team
#include<stdio.h>
void main()
{
int a,b;
printf("\n Enter two numbers:");
scanf("%d%d",a,b);
(a>b)?printf("\n The largest is %d",a):printf("\n The largest is %d",b);
}