Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

NOOB Question

Name: Anonymous 2006-09-25 21:46

K very simple question which i hope can be answered just as simply.
New to java.
Trying to read an ineger and assign it to a variable.
using c consle.
For example:
------------------
int age;   //???
c.print("Age: ");
           //read age
c.println("Your "+age+"years old");
------------------------------------
Easy enough?
Thanks

Name: Anonymous 2006-09-25 21:53

DO YOUR OWN HOMOWORK FAGGOT

Name: Anonymous 2006-09-25 21:55

if(>>1.faggot==true) {
  alert(39/0); }

Name: Anonymous 2006-09-25 21:56

c.println("You're "+age+" years old.");
fix'd
Actually,
c.println("You are "+age+" years old.");
..since computers can't use contractions.

Name: Anonymous 2006-09-25 21:58

>>2
I would love to it's just that i kind find a tutorial anywhere that doesn't just assume you know the nub stuff already.

just need some help and i'll be on my way..

Name: Anonymous 2006-09-25 21:59

>>4
gee thanks mister!!

Name: Anonymous 2006-09-25 22:14

anyone?

Name: Anonymous 2006-09-25 22:35 (sage)

SHOVE YOUR JAVA UP uR ARSSSE

Name: Anonymous 2006-09-25 22:37

nvm got it

Name: Anonymous 2006-09-25 22:37

fags

Name: Anonymous 2006-09-26 1:29

import java.util.Scanner;

public static void main(String[] args) {
  Scanner cin = new Scanner(system.in);
  System.out.println("Age: ");
  int age = cin.nextInt();
  System.out.println("You are " + age + " years old.\n");
  return;
}

Name: Anonymous 2006-09-26 3:06

>>4 "..since computers can't use contractions"

#include <stdio.h>
int main(void)
{
   puts("You\'re wrong!");
   return 0;
}

The fuck they can't.

Name: Anonymous 2006-09-26 4:42

>>12
Why are you escaping the '? This isn't perl or python.

Name: Anonymous 2006-09-26 5:14

Java is awesome for it's simpleness :)

import java.io.*;
class ReadAge {
        public static void main (String[] arg) throws Exception {
                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                int a = Integer.parseInt(br.readLine());
                System.out.println("You're " + a + " years old");
        }
}

Name: Anonymous 2006-09-26 5:26

>>4
..since computers can't use contractions.
What!?

>>13
You don't have to in Perl or Python either, unless you open quotes with ' .


Here's the homework, fixed:
print "Enter your age"
age = int(raw_input())
print "You're a fag either way"

Name: Anonymous 2006-09-26 18:33

Don't worry >>4. I lol'd.

Name: Anonymous 2010-12-09 5:26

Name: Sgt.Kabu㣈ᚊkiman뺀벓 2012-05-28 20:11

Bringing /prog/ back to its people

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List