9 #include #include double area (double r); 12 using namespace std; 10 11 13 int main() 15 - { 14 double number; string instrname, studnamef, studnamel, rotfood, number, adjective, color, animal; 16 17 18 cout<< "Please input the following information: \n"; cout<< "First or last name of instructor: "; cin>> instrname; 19 20 21 22 cout<< "Your Name (first press enter and the last name): cin>> studnamef >> studnamel; 23 24 25 cout<< "A food: "; cin>> rotfood; 26 27 28 29 cout<< "A number: 30 cin>> number; 31 cout<< "An adjective: cin>> adjective; 32 33 34 cout<< "A color: "; cin>> color; 35 36 37 cout<< "An animal: "; cin>> animal; 38 39 40 <
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
What is wrong with the following code? When ran, the code is supposed to generate a mad-lib for the user to fill in. However, when ran, the
the language used is C++
istrname is instructor name and studnamef and studnamel are the first and last name of a student repesectfullly. and rotfood is a rotten food. The output for the mad lib is completely up to the user.


Step by step
Solved in 2 steps









