Answer to Question #98359 in C++ for Rana

Question #98359
Write a program that an integer value from the user. If the value between 1 and 100 inclusive,print "OK" otherwise don't print anything
1
Expert's answer
2019-11-11T16:33:08-0500



#include <iostream>

 

using namespace std;

 

int main()

{

   int value;

 

   // read an integer value from the user

   cin >> value;

   if (value >= 1 && value <= 100)

       cout << "OK";

 

   return 0;

}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS