It is currently Thu Mar 28, 2024 4:12 pm

All times are UTC - 5 hours



Forum rules


1.) No trolling. If you cant have fun without being a jerk to others, find some other forum to QQ
2.) No inappropriate/vulgar/sexually explicit posting. Staff reserves the right to deem anything they see fit as inappropriate.
3.) Have fun and don't post anything not geared at having fun!
4.) Please respect staff members and their decisions at all times. If you cannot accept a staff or moderator decision, please appeal to admin Seth.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Programming
PostPosted: Fri Mar 23, 2012 7:21 pm 
Major
Major
User avatar
 Profile

Joined: Sat Dec 19, 2009 7:48 pm
Posts: 2693
Gender: male
Hey, I highlighted the problem area of my code I am trying to make it show the Radius of a circle.


Spoiler:
#include <iostream>
#include <cmath>

using namespace std;

int main ()
{

cout << "Welcome to Jakes Geometry helper for circle measurements" << endl;
cout << "Hit 1 to find the C using the D or R, Hit 2 to find the D with R or C, or hit 3 to find the R with C or D." << endl;

int answer;
int answerb;
int pie;
int radius;
int diameter;
int c;

pie += 3;

cin >> answer;

if (answer == 1)
{
//c

cout << "What would you like to use to find the C? R [1] or D[2]?" << endl;

cin >> answerb;

if (answerb == 1)
{
//R
}

else if (answerb == 2)
{
//D
}

}

else if (answer == 2)
{
//D

cout << "What would you like to use to find the D? R [1] or C [2]?" << endl;

cin >> answerb;

if (answerb == 1)
{
//R
}
else if (answerb == 2)
{
//C
}
}

else if (answer == 3)
{
//R

cout << "What would you like to use to find the R? D [1] or C [2]?" << endl;

cin >> answerb;

if (answerb == 1)
{
//D
}
else if (answerb == 2)
{
cout << "What is the Circumfrence of the Circle?" << endl;
cin >> c;
cout << c /= pie;

}
}

system ("PAUSE");
return 0;

}

_________________
Image

Image


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:24 pm 
Lieutenant Major
Lieutenant Major
 Profile

Joined: Mon Feb 14, 2011 3:24 pm
Posts: 2325
Location: no location for you
Gender: female
sounds like you have a lot of trouble with this stuff

_________________
Image
Image
PSN: aLpHaOmEgAXII


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:25 pm 
Major
Major
User avatar
 Profile

Joined: Sat Dec 19, 2009 7:48 pm
Posts: 2693
Gender: male
OmegaXII wrote:
sounds like you have a lot of trouble with this stuff


I think its because I learn it all on my own, I haven't been following any videos or anyhing :P

I just woke up this morning and I was like "hey! why don't I make a program for calculating circle measurements? :D "

_________________
Image

Image


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:29 pm 
Captain
Captain
User avatar
 Profile

Joined: Tue Dec 14, 2010 10:55 am
Posts: 1163
You've never said thankyou when I helped you in the past.


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:30 pm 
Lieutenant Major
Lieutenant Major
 Profile

Joined: Mon Feb 14, 2011 3:24 pm
Posts: 2325
Location: no location for you
Gender: female
i need to learn this stuff, it interests me :lol:

and im gone *disappears*

_________________
Image
Image
PSN: aLpHaOmEgAXII


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:33 pm 
Major
Major
User avatar
 Profile

Joined: Sat Dec 19, 2009 7:48 pm
Posts: 2693
Gender: male
Diazepam wrote:
You've never said thankyou when I helped you in the past.


Im sorry, lol if it means anything when you help me I get so excited about fixing my problem that I forget to say thankyou.

You have made an impact :P

Thanks. (Hug)

_________________
Image

Image


Top
 

 Post subject: Re: Programming
PostPosted: Fri Mar 23, 2012 7:40 pm 
Sergeant Major
Sergeant Major
User avatar
 WWW  YIM  Profile

Joined: Thu Jun 30, 2011 2:48 am
Posts: 7996
Location: Fuyuki City
Gender: male
flash again?

shoulda tell us wat the language...

_________________
Image


Top
 

 Post subject: Re: Programming
PostPosted: Sat Mar 24, 2012 6:38 am 
Captain
Captain
User avatar
 WWW  Profile

Joined: Sun Jan 16, 2011 8:43 am
Posts: 1129
Location: Philippines
Gender: male
It's C++ obviously :P

(1) Stop using += after a null declaration.... -_-
Code:
int pie;
int radius;
int diameter;
int c;

pie += 3;

*staaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaare*
Code:
int pie = 3;

...or (this is a much better alternative)
Code:
double pie = 3.1415;


(2) Finish the damn code. >.>

_________________
<New Sig In the Works ;) >
I dare you. Stay alive in this Bloody RP ~ Turn51. Do it... now!


Top
 

Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Copyright Tacticsoft Ltd. 2008   
Updated By phpBBservice.nl