sysh's Profile
Reputation: -1
Dishonored
- Group:
- New Members
- Active Posts:
- 15 (0.06 per day)
- Joined:
- 30-September 12
- Profile Views:
- 46
- Last Active:
Dec 12 2012 11:55 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Making a centered pyramid using an entered size
Posted 29 Oct 2012
Thank you so much for helping me out with this! It took me a while to grasp what you were trying to tell me, but it finally just clicked. Part of the issue was that I assumed that for it to go down, I'd need both variables to follow the x-- format, but I get it now. -
In Topic: Making a centered pyramid using an entered size
Posted 29 Oct 2012
I've written out a few bits of code for the second part, but I still keep getting a single line of stars. Should I be looking at more nested loops to put in, or would that be making this too complicated?
for(int c = number; c <= 50; c--){ for (int d = c; d < c; d--) {
for (int c = number; number <= c; number--){ for (int d = 0; d < c; d--) {
for (int c = (number - 1); (number -1) <= c; number--){ for (int d = 0; d < c; c--) {
@jon.kiparsky
Thank you, I missed that off zero equation. -
In Topic: Making a centered pyramid using an entered size
Posted 29 Oct 2012
jon.kiparsky, on 29 October 2012 - 07:32 AM, said:So if that's how you build up a triangle, by starting at zero and adding until you get to the number, and you want to do the reverse of that...
starting at the number and subtracting, maybe?
Thank you for the reply. I see where you're going with this, and I've put together a few bits of code. However, that forces the stars to straighten out instead of form a triangle.
if (number <= 50) for(int a = 1; a <= number; a++){ for (int b = 0; b < a; b++) { System.out.print("*"); } for(int c = number; c <= number - 1; c--){ for (int d = 0; d > c; c--){ System.out.print("*"); } System.out.println(); -
In Topic: Confusion in setting char/int for formula in Celsius/Fahrenheit code
Posted 15 Oct 2012
I see what you mean. I changed it to
char[] type = {'C', 'c', 'f', 'F'};
but now receive errors for my codes
if (type == 'C', 'c') if (type == 'F', 'f')
I get the messages
"Incompatible operand types char[] and int" and "Syntax error on token ",", * expected" respectively for both if codes. -
In Topic: Compilation error in Stock program
Posted 30 Sep 2012
I apologize that I'm not coming across well. New DIR
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
sysh hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
sysh has no profile comments yet. Why not say hello?