Question: a. Write a pseudo code read a character and if the character is 'A' or 'a' then calculate area of semicircle and print the
a. Write a pseudo code read a character and if the character is 'A' or 'a' then calculate area of semicircle and print the area of semicircle otherwise calculate area of rectangle and print the area of rectangle. (6 Marks) Note: Area of semicircle- (12)ar; r-radius Area of triangle- B*L; B-Bradth, L-Length b. Find the errors if any in Column A write the correct statement in column B for the following program. (2 Marks) Column A #Include void main() int number 0; printf("enter a number:"); scanf("%d", &number); switch(&number) case 10 printf("number is equals to 10"); break; case 50: printf("number is equal to 50"); break case 100: printf("number is equal to 100"); break; defualt: printf("number is not equal to 10, 50 or 100"); } Column B
Step by Step Solution
3.32 Rating (164 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
