Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Download - Green Lantern 2011
Arithmetic Display Only (No Input/Output) EmptySun Sep 25, 2011 4:47 pm by Admin

» Download - Shark Night 3D
Arithmetic Display Only (No Input/Output) EmptySun Sep 25, 2011 4:41 pm by Admin

» Download - Apollo 18
Arithmetic Display Only (No Input/Output) EmptyWed Sep 21, 2011 6:37 am by Admin

» [REMODELLED] PSP E1000 - REVAMPED
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 9:56 am by Admin

» PS VITA IS OFFICIALLY REGION FREE!!
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 9:49 am by Admin

» Manga - Popcorn Avatar
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 9:11 am by Admin

» [UPCOMING SOON] Assassin's Creed - Revelations
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 8:44 am by Admin

» Assassin's Creed 2
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 8:26 am by Admin

» Assassin's Creed
Arithmetic Display Only (No Input/Output) EmptyMon Sep 19, 2011 6:47 am by Admin

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

Admin

Admin
Investor Persona
File name: arithmetic.java

Code:

public class arithmetic{
public static void main(String[] args){
                                      int sum, quot, diff, mod;
                    double ave;

                    sum = 1+1+8;
                    diff  = 15-7;
                    quot = 22/2;
                    prod = 5*6;
                    mod = 20%5;
                    ave = sum/3;

                    System.out.println("Sum: "+sum);
                    System.out.println("Difference: "+diff);
                    System.out.println("Product: "+prod);
                    System.out.println("Quotient: "+quot);
                    System.out.println("Modulo: "+mod);
                    System.out.println("Average: "+ave);

                                      }
}

Display Results:

Sum: 10
Difference: 8
Product: 30
Quotient: 11
Modulo:
Average: 3.33

https://advatar.forumotion.com
Share this post on: reddit

No Comment.

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Create a forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com