Answer to Question #132915 in C++ for Jonathan Espinosa

Question #132915
Write an expression that prints "Special number" if specialNum is 0, -99, or 44.
1
Expert's answer
2020-09-13T16:30:03-0400

// the preprocessing directives

#include <iostream>      // cin, cout

using namespace std;


int main()

{

   int specialNum;

   cout << "Enter specialNum: ";

   cin >> specialNum;         // Get value specialNum from user


  if(specialNum==0 || specialNum==-99 || specialNum==44)

        cout<<"Special number";


    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