Create a program named Program5_Overview_YourName.cpp to include the following code segment into your program o You have to take care of variable declaration and other needed lines/statements change the if-else if-else structure to switch-case structure o You must keep the functioning of the program - use different structure to implement the same task ● Program 5: More on C++ Programming Due on Sunday, 10/30/2022, by 11:59pm cout << "Enter a number from 1 to 10: cin >> num; page. if (num==1) else if (num==2 else if (num==3 else if (num==4) else total = 60; cout << total << endl; total = 1; total = 5; total = 27; total = 39; Snapshot your compiler window with the output lines fully displayed after you successfully run your program and save the picture as Program5_YourName.png. Submit both of your program Program5_Overview_YourName.cpp (70%) and the picture Program5_YourName.png (30%) to Blackboard via Program5 link in Assignments section of the course
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
Hello, good afternoon. Can I get any help with this assignment please? Thank you (:
Introduction:
- Switch case statements allow a value to change execution control and adhere to a selection-control method.
- They serve as a replacement for lengthy if clauses that compare a variable to a number of integral values.
- A multiway branch statement is the switch statement. It offers a simple method for allocating execution to various sections of code according to the expression's value.
Step by step
Solved in 4 steps with 2 images
The code has an error but I don't know how to solve it, it says line 4. And I don't see it complete at the end. Sorry that Im asking but i don't know how to do it