Computer Science, asked by tanush5776, 17 days ago

Draw a flowchart to accept two angles. Calculate and display whether they are ‘Complementary Angles’ or ‘Not Complementary Angles’

Answers

Answered by Equestriadash
6

                                                 \sf{In put\ (\bf x\ \&\ y)}

                                                           \Bigg\downarrow

                                        \swarrow\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \searrow

                   \sf If\ x\ +\ y\ ==\ 90^\circ{}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ If\ x\ +\ y\ \neq\ 90^\circ{}

                              \Bigg\downarrow\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \ \   \Bigg\downarrow

     \sf Print\ \bf "Complementary\ Angles"\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \sf Print\ \bf"Not\ Complementary\ Angles"

A Python program for the same:

\tt x\ =\ int(in put("Enter\ an\ angle\ measure:\ "))\\y\ =\ int(in put("Enter\ a\ second\ angle\ measure:\ "))\\if\ x\ +\ y\ ==\ 90:\\{\ \ \ \ \ }print("They're\ Complementary\ Angles.")\\else:\\{\ \ \ \ \ }print("They're\ not\ Complementary\ Angles.")

The checking is done using the if-else structure in Python, also known as 'conditional statements' which are statements used to check for a required condition and carry on the program accordingly.

Similar questions