Thu Apr 05, 2007 8:58 pm
#include<iostream>
using namespace std;
int main()
{
int n,i;
char choise;
cout<<"\n\n Cairo University "<<endl;
cout<<" Faculty of computers and information"<<endl;
cout<<" CS - MATH SOCIETY"<<endl;
cout<<" ---------------------"<<endl<<endl;
cout<<" INFINITY GROUP "<<endl;
cout<<" <><>"<<endl;
cout<<"\n\n\tWhen you draw anumber of lines on aplane it divide the plane into\n\t\t\t\t anumber of parts .\n\t\t We now can calculate them by this program. \n\n\t\t\t ***lines and parts***";
do
{
cout<<"\n\n\t\t\tThe number of lines = ";
cin>>n;
i=((n*n)+n+2)/2;
cout<<"\n\n\t\tNumber of parts = "<<i<<endl;
cout<<"\n\tAre you want to test another number?(y/n) ";
cin>>choise;
}
while(choise=='y'||choise=='Y');
cout<<" \n\n *** WITH MY BEST WISHES ***"<<endl;
cout<<" INFINITY GROUP "<<endl;
cout<<" <><>"<<endl;
cout<<"\t\t\tType Exit to close the program : ";
cin>>choise;
return 0;
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.