Hey guys.... im taking this programming course in college... and i actually need some help............ i need to make a program using C++ to print prime numbers...............
plzzz help!!!!
thanks in advance!
Page
of
1Hey guys.... im taking this programming course in college... and i actually need some help............ i need to make a program using C++ to print prime numbers...............
plzzz help!!!!
thanks in advance!
SHAADI DONE 25.12
Ranveer Singh Fired From DON 3
Katrina looks ordinary infront of Kareena!!!
Tulsi Mihir mulaqat
-Happy Birthday Adnan Khan- 🎉 😇
Zindagi Ke Rang ~ Rangad/Kabirima/Amritam FF - chap 26 on pg 5
Anyone feels that more screenspace should be given to younger couples?
High time to end the star plus legacy show!!
Is Abhiara one of the reasons for gen 4's downfall?
Originally posted by: pinka_anshu
/*prime number check between 1 to a range , range will be enter by user*/
#include<iostream.h>
#include<conio.h>
void main()
{
int num;
clrscr();
cout<<"enter value till to be check";
cin>>num;/*all prime number will be chacke between 1 to num*/
if( num!=1)
{
for(int i=2;i<num+1;i++)
{
int flag=0;
for(int j=2;j<i;j++)
{ if (i%j==0)
flag=1;
}
if(flag==0)
cout<<"\n"<< i; /* print the prime number between 1 to num*/
}
}
else
cout<< num<<"is prime number";
getch();
}
Originally posted by: AsliiGuy
Wow đ
So amazing that you all know this...C++ is hard...Good work, đ