Write a program that asks the user to enter a positive number then displays all numbers less or equal to it that are prime.
1
Expert's answer
2012-11-26T06:07:07-0500
#include<iostream> using namespace std; int main () { int num, a; cout << "Enter A Positive integer :"<<endl; cin >> num; cout<<" The Prime numbers are: " ; for(int i = 2; i < num; i++){ & if(i%2!=0){ & cout << i <<endl; & } } system("pause"); return 0; }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment