subject

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;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
5. illustrate how fine-line inventory classification can be used with product and market segments. what are the benefits and considerations when classifying inventory by product, market, and product/market?
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
You know the right answer?
Re-type the code and fix any errors. The code should convert non-positive numbers to 1.
if (us...
Questions
question
Mathematics, 22.09.2019 09:20
question
Mathematics, 22.09.2019 09:20
question
Mathematics, 22.09.2019 09:20
question
Mathematics, 22.09.2019 09:30