If the input is negative, make numltemsPointer be null. Otherwise, make numltemsPointer point to numltems and multiply the value to which numltemsPointer points by 10. Ex: If the user enters 99, the output should be: Items: 990

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ1
icon
Related questions
Question
If the input is negative, make numltemsPointer be null. Otherwise, make numltemsPointer point to numltems and multiply the
value to which numltemsPointer points by 10. Ex: If the user enters 99, the output should be:
Items: 990
368400.2174782.qx3zqy7
1 #include <iostream>
2 using namespace std;
3
4 int main() {
int* numItemsPointer;
int numItems;
7
8
cin >> numItems;
9.
10
V* Your solution goes here
*/
11
nullptr) {
if (numItemsPointer
cout <« "Items is negative" << endl;
}
else {
12
==
13
14
15
Transcribed Image Text:If the input is negative, make numltemsPointer be null. Otherwise, make numltemsPointer point to numltems and multiply the value to which numltemsPointer points by 10. Ex: If the user enters 99, the output should be: Items: 990 368400.2174782.qx3zqy7 1 #include <iostream> 2 using namespace std; 3 4 int main() { int* numItemsPointer; int numItems; 7 8 cin >> numItems; 9. 10 V* Your solution goes here */ 11 nullptr) { if (numItemsPointer cout <« "Items is negative" << endl; } else { 12 == 13 14 15
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning