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!
Ranveer Singh Fired From DON 3
SHAADI DONE 25.12
TUM MERI HOO 24.12
Katrina looks ordinary infront of Kareena!!!
YRKKH 2025 Recap: The Year Logic Died!
Akshaye Khanna walks out of Drishyam 3
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?
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, đ