CarrierZone
This blog is totally about conceptual fundas of C and C++ language.
Menu
Blog
About
Contact
CSS Minifier
Disclaimer
HTML Converter
Privacy Policy
Sitemap
Static Page
404 Page Not Found
Menu
Menu 1
Menu 2
Menu 3
Menu 4
Menu 5
Menu 6
Menu
Menu 1
Menu 2
Menu 3
Menu 4
Menu 5
Menu 6
Menu
Menu 1
Menu 2
Menu 3
Menu 4
Menu 5
Menu 6
Menu
Menu 1
Menu 2
Menu 3
Menu 4
Menu 5
Menu 6
Home
Unlabelled
program to find prime number after giving number in C++
Wednesday, 15 February 2017
program to find prime number after giving number in C++
Penulis
Unknown
Diterbitkan
07:46
Tags
#include<iostream>
using namespace std;
int main ()
{
int i,j,num;
cout<<"Enter number:-";
cin>>num;
cout<<"next prime number:-";
for(i=num+1;i<2000;i++)
{
for(j=2;j<i;j++)
{
if(i%j==0)
{
//cout<<"no prime no:-";
break;
}
}
if(i==j||i==0)
{
cout<<"\t"<<i;
break;
}
return 0;
}
}
Unknown
Next Post
Previous Post
Post a Comment
Subscribe to:
Post Comments (Atom)