# MARKS OF 10 STUDENTS #include<iostream.h> #include<conio.

h> int main() { clrscr(); int marks[10]; for(int i=0;i<50;i++) { cout<<"\n enter the marks of" <<i+1<<"="; cin>>marks[i]; } for(int j=0;j<50;j++) { cout<<marks[j]<<"\n"; } getch(); return(0); }

TO FIND THE FACTORIAL #include<iostream.h> #include<conio.h> int main() { int i,f=1,n; cout<<"please enter the till which no. u want factorial"; cin>>n; for(i=1;i<=n;i++) {f=f*i;} cout<<f; getch(); return(0); }

FIBONACCI SERIES #include<iostream.h> #include<conio.h> int main() { int f,i,n,a=0,b=1; cout<<"please enter the number till which u want the fibonacii series"; cin>>n; if(n==1)

temp. b. } } getch().} else {cout<<"not a palindrome". cout<<"please enter the number".} if(n==2) {cout<<b.} getch(). num=num/10.i++) { f=a+b.". rev=rev*10+r. if(a==1) cout<<"neither prime nor composite".h> int main() { int i. else { . while(num!=0) {r=num%10. cin>>a.{cout<<a. i. return(0).h> #include<conio.h> int main() { int a.h> #include<conio.} if(n>2) { cout<<a<<b. cin>>num.r. return(0). } PALINDROME #include<iostream.num. } if(rev==temp) {cout<<"it is palindrome". b=f. cout<<f . temp=num. } PRIME OR NOT #include<iostream. a=b. for(i=1. cout<<"enter the no.i<=(n-2).rev=0.

int &top. if(res==-1) {cout<<"overflow.top. } void main() { int stack[size]. char ch='y'. } return0. } getch(). res=push(stack. cin>>ch. exit(0).item). while(ch=='y'||ch=='Y') {cout<<"enter item for insertion. i++) { if(a%i==0) { b++. i<=(a/2).top) cout<<"want to insert more". return(0).int top) { for(int i=top. islplay(stack.. int push(int stack[].top=-1. . cin>>item.item.i>=0.int item) { if(top==size-1) return-1. else cout<<"\nit is NOT Prime". } } if(b==0) cout<<"\nit is prime".aborting".h> const int size=50.i--) cout<<stack[i]<<endl.b=0. } cout<<"stack now is". else {top++ stack[top]=item. } INSERTION IN STACK #include<iostream. for(i=2.res.h> #include<conio. } void display(int stack[].

delete[]marks. } cout <<"\troll no \tMarks\n". digit++. getch(). marks = new float[size]. cin >>rollno[i]>>marks[i]. } POINTERS MARKS #include<iostream. return 1. if((!rollno)||(!marks)) { cout<<"Out".i.i<size. cout<<"Enter size ".h> #include<conio.i++) cout << "\t"<<rollno[i]<<"\t"<<marks[i]<<"\n".i++) { cout << "enter rollno and marks for " << i+1 << "\n".h> int *rollno. while(num!=0) { num=num/10. cin>>size. } for(i=0. int main() { int size.h> #include<conio. } SWAPING OF NUMBERS #include<iostream.} getch(). . return(0).h> int main() { int num.digit=0. rollno = new int[size].i<size. float *marks. delete[]rollno. } cout<<digit. for(i=0. cout<<"please enter the number". cin>>num.

char ch. enter(). } STRUCTURE 1 #include<iostream. }. // for function void enter(void). char area[26].empno==eno) {display(i). cin>>ch. do { cout<<"\n enter the employ no.getch(). } . whose information is to be displayed".i. int eno. break.h> struct addr { int houseno. void main() { clrscr(). void display(int a).h> #include<conio.i<10. flag=1. getch(). addr address.i++) { if(sales_emp[i]. } while(ch=='y'). } } if(!flag) { cout<<"\nsorry no such employ exist". struct emp { int empno. int flag=0.h> #include<stdio. } cout<<"\n display more(y/n)". return 0. emp sales_emp[10]. cin>>eno. for(i=0. }worker.