Question: CS205, Lab 4, Marks 2 Q1: 1 marks: - Convert Q2 from Lab 3 (A3) by switch statement. - Run your program for the same


CS205, Lab 4, Marks 2 Q1: 1 marks: - Convert Q2 from Lab 3 (A3) by "switch" statement. - Run your program for the same input for Q2A3. - Then put your code and screen output for all inputs Sample code for "switch": \#include> using namespace std; int main() \{ char g; cout g; switch(g) case 'a': case 'A': cout =2) - Print if it is prime or not - Do your program by while loop - Run your program for n=2,3,10,11 - Give your code here - Give your output for every n - Sample code and output for for loop is given Sample code: int n,i; bool is prime; cout "Enter an integer (>=2) for chcking prime or not: "; cin n; is prime = true; for (i=2;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
