Name two kinds of statements in C++ that alter the order in which actions are performed. Give some examples.
Name two kinds of statements in C++ are:
Iteration statements: Examples do-while and while statements
Branching statements: Examples if-else and if statements
#include <iostream>
using namespace std;
int main(){
int speed;
const int normal_speed = 60;
cout<<"Enter You're Speed: ";
cin>> speed;
if(speed > normal_speed){
cout<<"please You're Speed Is over 60 "<<endl;
}else if(speed < normal_speed){
cout<<"You're speed is less than 60, you can increase the speed to 60, if you want"<<endl;
}
return 0;
}
Post the discussion to improve the above solution.