untitled
My sites
Home
Plus One
Plus two
Your Voice
About Author
Brother's Site
First Home
Kerala Links
Indian Links
Indian Fonts
Site Submission
Thss,Mlpy
Plus One Programs
Index of programs:Set 2
Amstrong number or not
Amstrong and palindrome
Fibonacii series
Group a set into odd or even arrays
Whether number prime or not
<<
Previous
Next Page
>>
Program1:
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To find whether number amstrong or not Meant For: Plus One students,Kerala */ void main() { clrscr(); long int di,am,re=0; cout<<"Enter number you want"; cin>>am; long int c=am; while(am!=0) { di=am%10; re=re+(di*di*di); // for not using any function am=am/10; } if(re==c) cout<<" The number is amstrong"; else cout<<" The number is not amstrong"; cout<<"\n Press any key to continue"; getch(); }
Program 2:
#include
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To find amstrong and check palindrome Meant For: Plus One students,Kerala */ void main() { int amstr(int); int rev(int); clrscr(); int num; cout<<"Enter number"; cin>>num; int n=num; int x=amstr(n); if(num==x) cout<<"\n\t"<
Program 3:
#include
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To generate fibonacii series Meant For: Plus One students,Kerala */ double main() { double a=0,b=1,li; cout<<"Enter how many fibonacii numbers you want:"; cin>>li; cout<
Program 4:
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To sort given list of numbers into even no and odd no groups Meant For: Plus One students,Kerala */ void main() { clrscr(); int num[500],ev[500],odd[500],e=0,o=0,n; cout<<"Enter the limit of entering numbers:"; cin>>n; for(int i=1;i<=n;i++) { cout<<"Number:?"; cin>>num[i]; } for(i=1;i<=n;i++) if(num[i]%2==0) { e++; ev[e]=num[i]; } else { o++; odd[o]=num[i]; } cout<<"\n\n\n Set of even numbers are: \n"; for(i=1;i<=e;i++) cout<<"\t"<
Program 5:
#include
#include
#include
#include
/* Author : Rohith.R Email : rrohithr@gmail.com Category : Begineer Program : To find whether a number is prime or not Meant For: Plus One students,Kerala */ void main() { long int pri,n; clrscr(); cout<<"Please enter the number u want to check:"; cin>>pri; if(pri==1) { cout<<"\n Neither prime nor composite"; getch(); exit(0); } if(pri<=0) { cout<<"\n Cannot be determined"; getch(); exit(0); } n=2; while(n<=pri/2) { if(pri%n==0) break; n++; } if(n>pri/2) cout<<"The given no:is prime"; else cout<<"The given number is composite"; cout<<"\n Press any key to continue"; getch(); }
<<
Previous Page
Next Page>>
Web Hosting
·
Blog
·
Guestbooks
·
Message Forums
·
Mailing Lists
Easiest Website Builder ever!
·
Build your own toolbar
·
Free Talking Character
·
Email Marketing
powered by
bravenet.com