Public feed #889425

Etwas

public text v1 · immutable
Raw Edit
·published 2008-02-02 22:10 UTC
rendered paste body
import java.io.*;
 
class addition
{
        public static void main (String args[])
        {
                try
                {
                String a1,b1;
                int a,b,c;            
                BufferedReader infile = new BufferedReader(new InputStreamReader (System.in));
                System.out.print("Bitte 1. Zahl eingeben: ");
                a1= infile.readLine();
                blubb(a1);
            }
            catch (Exception KeineZahlSondernBuchstabe)
            {
            System.out.println("Gib eine Zahl ein " + KeineZahlSondernBuchstabe);
            }
        }
 
        private static void blubb (String a1) {
                int a, c;
                a=Integer.parseInt(a1);  
                c= a*a;
                System.out.print("Ergebnis: " + c );
        }
}