Q. Given the following pseudo code:


Use variables sum, product, number1, number2 of type real
display "Input two numbers"
accept number1, number2
sum number1 + number2 
print "The sum is", sum
product number1* number2
print "The Product is ", product
end program

Draw a flow chart for the same and dry run the given pseudocode if it is working

Answer :-

Program of pseudocode :-
n1 = int(input("Enter Number 1 :- "))
n2 = int(input("Enter Number 2 :- "))
sum = n1 + n2
product = n1 * n2
print("Sum of Numbers :- ", sum)
print("Product of numbers :- ", product)
Output :-

Enter Number 1 :- 5
Enter Number 2 :- 9
Sum of Numbers :-  14
Product of numbers :-  45
>>>

Enter Number 1 :- 42
Enter Number 2 :- 96
Sum of Numbers :-  138
Product of numbers :-  4032
>>>

Flowchart :- 


Click on image for clear view.

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post