Answer:
#include <bits/stdc++.h>
using namespace std;
int main() {
string in;//string in for taking input...
cout<<"Do you want to continue ?"<<endl;
getline(cin,in);//taking input from the user...
if(in=="y"||in=="Y"||in=="yes"||in=="OK"||in=="Why not?")//conditions..
cout<<"OK"<<endl;
else if(in=="No")
cout<<"terminating"<<endl;
else
cout<<"Bad input"<<endl;
return 0;
}
Explanation:
I have taken a string in.
Then taking input from user.
Checking the conditions using if else if ladder.
Answer:
Well you mean app and yo look at the bottom of your screen and there is 3 icons and press the one that says me then press edit and thats how u do it
Answer:
#here is code in python
#read the name
name=input("Enter your name:")
# read the age as integer
age=int(input("Enter your age:"))
#print the output in the required format
print("{} is {} years old.".format(name,age))
Explanation:
Read the name from user and assign it to variable "name".Then read the age from user and assign it to variable "age". In the next line print the output as required using the format function.
Output:
Enter your Sam
Enter your age:24
Sam is 24 years old.