Wednesday, July 18, 2012

Checking leap year

#include<conio.h>
#include<iostream.h>
int main()
{
int year;
cout<<"Enter year :";
cin>>year;
if(year%400==0||year%100==0||year%4==0)
cout<<endl<<year<<" is Leap year .";
else
cout<<endl<<year<<" is Not Leap year .";
getch();
}

Counting vowels in String

#include<conio.h>
#include<iostream.h>
int main()
{
char mystring[]="Programming is Practise";
cout<<mystring;
int x=0,count=0;
while(mystring[x]!='\0')
{
if(mystring[x]=='a'||mystring[x]=='e'||mystring[x]=='i'||mystring[x]=='o'||mystring[x]=='u'||mystring[x]=='A'||mystring[x]=='E'||mystring[x]=='I'||mystring[x]=='O'||mystring[x]=='U')
count++;
x++;


}
cout<<endl<<"There are :"<<count<<" Vowels .";
getch();
}

Hello World

#include<conio.h>
#include<iostream.h>
int main()
{
char mystring[]="Hello World";
cout<<mystring;
getch();
}

Wednesday, February 8, 2012

program 2
//Program to find all Mathematical operation on two operators a & b
//i.e a+b ,a-b ,a*b, a/b ,a%b .
#include
#include
int main()
{
float a,b,res;
cout<<"Enter a:"; cin>>a;
cout<<"\n Enter b:"; cin>>b;
cout<<"\n Division of a & b is : "< cout<<"\n Multiplication of a & b is : "< cout<<"\n Addition of a & b is : "< cout<<"\n Subtraction of a & b is : "< cout<<"\n Mode of a & b is : "
getch();



}

Sunday, January 22, 2012

Main Code of Bank managment data base system




#include
#include
#include"Customer.h"
#include
#include"ATM.h"
#include"bank.h"
#include
#include
#include"node.h"
#include"linklist.h"
int main()
{
bank b;int no;
linklist l1;

cout<>ch;char t[1];gets(t);
while(ch=='y'||ch=='Y')
{
b.setrecord();cout<<"\nTo enter more records Press Y/y";cin>>ch;

}
b.show();
cout<<"\nHow many Customers awaiting ? :"; cin>>no;
getch();
for(int i=0;i>choice;
switch(choice)
{
case 1:
{b.help();break;}
case 2:
{b.deposit_withdraw();break;}
case 3:
{b.showrec();break;}
case 4:
{b.exit();l1. DeleteF();i++;}
default:
{cout<<"\nInvalid selection";} } } }