Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > The Community > Chit Chat

GoogleCommunity Sponsor

Reply
 
LinkBack Thread Tools Display Modes
Old 03-02-2009, 04:36 AM   #1 (permalink)
Googler
 
Join Date: Dec 2008
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
wolfyy1 is on a distinguished road
Computer Programming

#include<iostream.h>
#include<math.h>
int main()
{
//2
int num, num1;
cout<<"Enter two variables"<<endl;
cout<<"1. ";
cin>>num;
cout<<"2. ";
cin>>num1;
if (num1%num==0)
{cout<<"True"<<endl;
}
else
{cout<<"False"<<endl;
}
cout<<endl;
cout<<"____________________________________"<<endl ;

//5
int a, b, c, answer, answer2;
cout<<"Enter variables"<<endl;
cout<<"a=";
cin>>a;
cout<<"b=";
cin>>b;
cout<<"c=";
cin>>c;
answer=(-b+(sqrt((b*b)-4*a*c)))/(2*a);
answer2=(-b-(sqrt((b*b)-4*a*c)))/(2*a);

cout<<"The answer is "<<answer<<" & "<<answer2<<endl;
cout<<endl;
cout<<"_________________________________________"< <endl;
//19
char enter;
cout<<"Enter a letter"<<endl;
cin>>enter;
cout<<endl;
switch(enter)
{
case 'A':
cout<<"D"<<endl;
break;
case 'B':
cout<<"E"<<endl;
break;
case 'C':
cout<<"F"<<endl;
break;
case 'D':
cout<<"G"<<endl;
break;
case 'E':
cout<<"H"<<endl;
break;
case 'F':
cout<<"I"<<endl;
break;
case 'G':
cout<<"J"<<endl;
break;
case 'H':
cout<<"K"<<endl;
break;
case 'I':
cout<<"L"<<endl;
break;
case 'J':
cout<<"M"<<endl;
break;
case 'K':
cout<<"N"<<endl;
break;
case 'L':
cout<<"O"<<endl;
break;
case 'M':
cout<<"P"<<endl;
break;
case 'N':
cout<<"Q"<<endl;
break;
case 'O':
cout<<"R"<<endl;
break;
case 'P':
cout<<"S"<<endl;
break;
case 'Q':
cout<<"T"<<endl;
break;
case 'R':
cout<<"U"<<endl;
break;
case 'S':
cout<<"V"<<endl;
break;
case 'T':
cout<<"W"<<endl;
break;
case 'U':
cout<<"X"<<endl;
break;
case 'V':
cout<<"Y"<<endl;
break;
case 'W':
cout<<"Z"<<endl;
break;
case 'X':
cout<<"A"<<endl;
break;
case 'Y':
cout<<"B"<<endl;
break;
case 'Z':
cout<<"C"<<endl;
break;
default:
cout<<enter<<endl;
}
if (enter==0)
{cout<<"Illegalselection--no result calculated"<<endl;
}
else
{
cout.setf(ios::fixed);
cout<<endl;
}




return(0);
}
wolfyy1 is offline   Reply With Quote
 
Sponsored Links
Old 03-07-2009, 03:47 AM   #2 (permalink)
Elite Googler
 
desigac's Avatar
 
Join Date: Jul 2007
Posts: 1,300
Thanks: 12
Thanked 31 Times in 30 Posts
desigac is on a distinguished road
Nice to get more program like this.






Part Time Jobs | Work at home | Jobs Online | Data Entry Jobs | Easy Money | Free Money o

Free Part Time Jobs | Free Jobs Online | Free Data Entry Jobs | Free Work At Home Jobs
desigac is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Programming wolfyy1 Chit Chat 1 01-15-2009 12:24 PM
Computer Programming- Guess Game wolfyy1 Chit Chat 2 12-16-2008 07:40 AM
HELP! with Java Programming tenzuu Web Design, Coding & Programming Forum 0 10-19-2007 08:29 PM
Web programming question. Endante Web Design, Coding & Programming Forum 6 03-23-2006 12:26 PM
Game Programming JoeSSJ4 General Discussion 8 04-30-2005 11:07 AM


All times are GMT -8. The time now is 03:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community