Computer Science, asked by Argha2633, 6 months ago

A. given the flowchart in figure 1 below, write a program that prompts the user to enter two integer numbers, compares them and adds them only if the first number is less than the second number, otherwise subtract them and displays the output in each case. figure 1: flowchart

Answers

Answered by arfatali1903
0

Answer:

Solution in C language

Explanation:

#include <stdio.h>

#include <conio.h>

void main( )

{

int a, b;

clrscr( );

printf("Enter two numbers :");

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

if(b>a)

{

printf("Sum is : %d",a+b);

}

else

{

printf("Subtraction is : %d",a-b);

}

getch( );

}

Similar questions