Welcome to Gaia! ::

Reply The Literate Role Player's Association
OOC Chat: Electric Boogaloo! Goto Page: [] [<<] [<<] [<] 1 2 3 ... 561 562 563 564 565 566 ... 734 735 736 737 [>] [>>] [>>] [»|]

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Leox

PostPosted: Fri Apr 14, 2006 11:57 pm


Barton is hell. Girls traped in masion, anyone?

Damn. I went to canada for the week and it took me 4 AND A HALF HOURS to get over the ******** border.

Damn. It.
PostPosted: Sat Apr 15, 2006 6:52 am


I think I may have had something clever to say here.

>

Now I'm just frustrated. Stupid Java. I ended up skipping one assignment and going onto the next one, because my teacher hasn't been online for a week and I'm having a heck of a time working some very large bugs out of a program.

shazzer
Captain


Soloist

PostPosted: Sat Apr 15, 2006 10:01 am


Well I just finished my CS finals Shazz, and I'm happy to take a look at what you're doing if you ever need a hand.

It's kind of stupid that now that I don't have class, I miss programming. Man, I am such a nerd.


In other news, expect a post in both Beyond Baten Kaitos AND Vanadiel. Now that things are winding down in collegeland, I'll be more active. Especially so when I get home in a couple weeks.
PostPosted: Sat Apr 15, 2006 10:16 am


Yessss. Soloist, I've been waiting to post in Vanadiel until you did, whichyou are... going to do!

Annie Goober


Jarlaxle Baenre

PostPosted: Sat Apr 15, 2006 10:47 am


I'd be glad to help to Shazz.

My AP Exam is coming in two weeks.
PostPosted: Sat Apr 15, 2006 11:08 am


Both posts are up. Go me. *does a dance*

Soloist


2k_Style

PostPosted: Sun Apr 16, 2006 12:26 am


Boo....

Barton Town is not the safe haven it once was ages ago when noobs hadn't infested it's relatively clean threads...

Where more than 5% of the rps were literate...

*le sigh*

I guess that's why there's so many guilds now?
PostPosted: Sun Apr 16, 2006 9:09 am


Quote:

/*
* Name, etc.
*
*/




import java.io.*;

class sixteenC
{
public static void main (String[] args) throws IOException
{

BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
String inData;

int length; //length of input String
int temp; //position of character
char character; //what the character is
int howMany = 0; //how many characters were converted

System.out.println("Input stuff, and the program will invert your letter cases.");
System.out.println("Input the period character (.) to end the program.");

do //loop, always runs
{
inData = stdin.readLine(); //reads input, puts into "inData"
length = inData.length(); //calling length method, putting result into "length"

for (temp = 0; temp < length - 1; temp = temp +1); //nested loop, resets temp to zero each input
{
character = inData.charAt(temp); //characters should go through one by one

if (character >= 65 && character <= 90) // is lower case
{
character += 32;
howMany += 1;
}

if (character >= 97 && character <= 122) // is upper case
{
character -= 32;
howMany += 1;
}


System.out.println(character);

} //for loop



} //do loop

while (!(inData.equals("."))); //test for the period, end

System.out.println("Program ending. There were " + howMany + " case inversions.");


} //main
} //class


It's supposed to invert letter cases. Right now, it, um... doesn't. I've been experimenting with it, so if there's anything weird, it's probably me trying to mess with it.

Also, I realise that it would only work on machines supporting ASCII. That's all that's required of me, so... sweatdrop

Ugh... Let's see if I can't fix the indents...

shazzer
Captain


RogueKazimeras
Vice Captain

PostPosted: Sun Apr 16, 2006 1:57 pm


23 days left... for what? ... or until what?
PostPosted: Sun Apr 16, 2006 2:46 pm


Graduation perhaps?

Jarlaxle Baenre


Soloist

PostPosted: Sun Apr 16, 2006 9:53 pm


Okie Shazz, quick thing about your code that could cause problems depending on the methods I don't see.

You're casting the variable character to a char type variable, because it is a single character out of a string. Understandable. BUT the problem here is, you then try to compare it to an integer in your if statement. By default, Java will treat those numbers given in the if condition as integers unless you tell it so otherwise, so the compiler probably gets confused when you say

If (chartypevariable) (intvalue). I don't know what methods you have available to check the ASCII size of the character you give it, but you'll definitely need one if you want to make that comparison. Other than that, it looks pretty good right now.
PostPosted: Sun Apr 16, 2006 10:33 pm


eek ....*stares at Soloist*

So uhh...yeah...

Is there anyone else here who's feeling strangely as if he's speaking a completely different language that some how sounds remotely like English every once in a while? xp

2k_Style


RogueKazimeras
Vice Captain

PostPosted: Sun Apr 16, 2006 11:02 pm


I didn't know Soloist could speak Chinese.
PostPosted: Mon Apr 17, 2006 12:39 am


Nononono

Youve got it all wrong, Chinese would be:


I HAV GAIA GOLD! U WAN BAI? MILION DOLAR. MY ENGRISH VERY GOOD YESH? U BAI YESH? YESH I CHARGE CREDIT CARD NOW.

Soloist


RogueKazimeras
Vice Captain

PostPosted: Mon Apr 17, 2006 1:11 am


Oh, man, Soloist.

That's so blatantly derogatory.

That.

I'm seriously.

Going to have to stop hitting the enter key and give you a pat on the back.

And direct you to the best comic ever. -> http://www.vgcats.com/comics/?strip_id=193
Reply
The Literate Role Player's Association

Goto Page: [] [<<] [<<] [<] 1 2 3 ... 561 562 563 564 565 566 ... 734 735 736 737 [>] [>>] [>>] [»|]
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum