Subscribe to Feeds

Send Your COMPLETED Projects To georgepj@hotmail.com

We'll Publish It With Your Name :-)

Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]

No. of repetitions of a digit

Click Here To Download C++ File Of This Program

 //Downloaded From www.c4cpp.co.nr  
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
int i,j,c=1,l;
char a[100];
cout<<"Enter Array"<<endl;
cin.getline(a,100);
l=strlen(a);
for(i=0;i<l;i++)
{
c=1;
for(j=i+1;j<l;j++)
{
if(a[i]==a[j])
{
c=c+1;
a[j]=' ';
}
}
if(a[i]!=' ')
cout<<"Element"<<a[i]<<"is present"<<c<<"times"<<endl;
}
getch();
}

Sum of n even Nos.

Click Here To Download C++ File Of This Program

 //Downloaded From www.c4cpp.co.nr 
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,s=0;
for(i=2;i<=100;i=i+2)
{
s=s+i;
cout<<"+"<<i;
}
cout<<"="<<s;
getch();
}

Array in given pattern

Click Here To Download C++ File Of This Program

 /*  
4 3 2 1
0 3 2 1
0 0 2 1
0 0 0 1
*/
//Downloaded From www.c4cpp.co.nr
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n,g,j,a[100],b[100][100];
cout<<"Enter Limit"<<endl;
cin>>n;
cout<<"Enter "<<endl;
for(g=0;g<n;g++)
cin>>a[g];
for(i=0;i<n;i++)
{
for(j=n-1;j>=0;j--)
{
b[i][j]=a[j];
}
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(i>j)
b[i][j]=0;
}
}
for(i=0;i<n;i++)
{
cout<<endl;
for(j=0;j<n;j++)
{
cout<<b[i][j]<<" ";
}
}
getch();
}

Predict Output 2

Click Here To Download C++ File Of This Program

 //Downloaded From www.c4cpp.co.nr  
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
void main()
{
clrscr();
char *Name="AnnUal ExaMiNaTION";
for(int x=0;x<strlen(Name);x++)
if(islower(Name[x]))
Name[x]=toupper(Name[x]);
else
if(isupper(Name[x]))
if(x%2!=0)
Name[x]=tolower(Name[x-1]);
else
Name[x]--;
cout<<Name<<endl;
getch();
}

Predict Output

Click Here To Download C++ File Of This Program

 //Downloaded From www.c4cpp.co.nr  
//(C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int i=0,ua=0,ub=0,uc=0,fail=0;
while(i<=5)
{switch(i++)
{case 1:
case 2:++ua;
case 3:
case 4:++ub;
case 5:++uc;
default:++fail;
}
}
cout<<" ua="<<ua<<",ub="<<ub<<",uc="<<uc<<",fail="<<fail;
getch();
}