76 285
Assignments Done
Successfully Done
In May 2019

Answer to Question #19243 in C++ for fatima

Question #19243
Write a program that asks the user to enter a positive number then displays all numbers less or equal to it that are prime.
Expert's answer
#include <iostream>
#include <stdlib.h>

using namespace std;

int main()

int a;
if (a<0) cout<<"a<0& !!!";
if (a>0)& {
for(int i=1;i<=a;i++)
{ cout<<"a="<<i<<endl;}
& }
& system("PAUSE");
& 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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions