Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package task3;
- /**
- *
- * @author AlbinSkola
- */
- public class Task3 {
- public static void main(String[] args) {
- Task3 c = new Task3();
- int Volym;
- int length = 10;
- int width = 5;
- int height = 10;
- int a = 100;
- System.out.println("\nVolymen är :" + c.v(length, width, height) * c.VolumeGet(a) + "cm3");
- }
- int v (int length, int width, int height) {
- System.out.println("Längden är: " + length);
- System.out.println("Bredden är: " + width);
- System.out.println("Höjden är: " + height);
- int v = length * width * height;
- System.out.println("Volymen av en stack är: " + v + "cm3");
- return v;
- }
- int VolumeGet (int a) {
- System.out.print("Antalet är: " + a);
- return a;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement