Answer to Question #189157 in C++ for Skye Jordan

Question #189157

Based on Control Structure Selection and Control Structure Looping, answer the following questions:


Write a program that will ask the user to input n positive numbers. The program will terminate if one of those numbers is not positive. Output :

https://cdn.discordapp.com/attachments/711213157854609461/839150310864846934/unknown.png



1
Expert's answer
2021-05-04T15:59:41-0400
#include <iostream>
using namespace std;
int main(){
    int n;
    do{
        cout<<"Enter a number: ";
        cin>>n;
    }while(n >= 0);
    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