Computer Science, asked by jaywantdabholkar90, 10 months ago

write an algorithm to read two number then display the smallest.​

Answers

Answered by FIRE07
9

PYTHON

PROGRAM

num1=int(input("enter the number"))

num2=int(input("enter the number"))

if num1>num2:

print("the numer1 is greater than number2")

else:

print("the number1 is smaller than number2 ")

hope the program is usefull..

hope the program is usefull.. plzz mark it as brainlist.

Answered by goutamipurra
4

Answer:Algorithm

Step 1: Start

Step 2:Initialize two integer variables

Step 3:Read the values of a,b

Step 4:Check whether a is smaller than b ,then display a is smaller.

Step 5:Display b as smaller

Step 6:Stop

Program:

#include<stdio.h>

int main()

{

       int a,b;

       printf("Enter the values of a and b\n");

      scanf("%d %d",&a,&b);

      if(a<b)

               printf("a is smaller\n");

      else

                printf("b is smaller\n");

                return 0;

}

Explanation:

Similar questions