Lab 6: Programming Exercises: Fundamentals of Computer Programming
Lab 6: Programming Exercises: Fundamentals of Computer Programming
Exercise 2 (switch statement Multiple selection statement) Write a program that takes two numbers as input from the user. The program should then display a list of arithmetic operations which the user can choose from. The user should be able to select one of the operations (use a switch statement). The program should then evaluate the result corresponding to the users selection. Interaction with the program might look like this:
Exercise 3 (continue statement) Write a program that prints all the numbers from 0 to 29 that are not divisible by 6. Use a continue statement to implement your program.
National University of Sciences & Technology Fundamentals of Computer Programming Course Instructor: Ms Samin Khaliq Exercise 4 (break statement) Type the following code in the editor and examine what the following program does?