Algorithm to find smallest of two numbers
Answers
Answered by
4
Answer:
#include<stdio.h>
#include<conio.h>
void main ()
{
int a, b;
printf("Enter your number a");
scanf("%d",&a);
printf("Enter your number b");
scanf("%d",&b);
if (a <b)
{
printf("%d",a);
}
else
{
printf("%d",b);
}
Explanation:
Algorithm
step 1: Start
step 2: Read the number a and b
Step 3 : check whether the a <b
step 4: if step 3 is true display (a)
step 5: else display (b)
step 6 : stop
Similar questions