Computers and Technology

Re-type the code and fix any errors. The code should convert non-positive numbers to 1.
if (userNum > 0)
cout << "Positive." << endl;
elsecout << "Not positive, converting to 1." << endl;
userNum = 1;
cout << "Final: " << userNum << endl;

#include
using namespace std;
int main() {
int userNum;
cin >> userNum;
/* Your solution goes here */
return 0;
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, Boogates7427
Apower user needs you to install a second type of operating system on his computer to increase efficiency while running some specialized software programs. which installation technique should you use?
Answers: 3
image
Computers and Technology, 22.06.2019 00:30, silasjob09
Jenny wants to look at row 345 and compare it to row 17. what can she do if she wanted to easily adjust to see both at once?
Answers: 3
image
Computers and Technology, 22.06.2019 06:30, westjayson69
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
image
Computers and Technology, 22.06.2019 12:30, zaratayyibah
Which of the choices sean are not true when considering virus behavior
Answers: 1
Do you know the correct answer?
Re-type the code and fix any errors. The code should convert non-positive numbers to 1.
if (us...

Questions in other subjects:

Konu
Biology, 11.01.2020 07:31
Konu
History, 11.01.2020 07:31