Untitled
Never
import java.util.Scanner; public class main2 { public static void main(String[] args) { // 1.3 Scanner s = new Scanner(System.in); // get all the input from user System.out.println("plese enter item net cost \n"); int itemCost = s.nextInt(); System.out.println("plese entertotal km transportation \n"); int totalKm = s.nextInt(); System.out.println("plese enterfloor num \n"); int floorNum = s.nextInt(); System.out.println("plese enter item weight \n "); int weight = s.nextInt(); //print total cost using the functions to calc all conditions System.out.println("your total cost is:\n" + (itemCost+calcFloor(floorNum,weight)+calcKm(totalKm))); } // function ti calc cost - km wise public static int calcKm (int a){ int costperfloor = 5; int result = costperfloor *a; return result; } // function to calc cost floor wise public static int calcFloor (int a, int b){ int COSTPERFLOOR = 1; int result = COSTPERFLOOR * a * b; return result; } }
Raw Text
-
sdfgndasdfbn adsdfg
40 sec ago
-
Untitled
2 min ago
-
UNDER AGE 11YR T
5 min ago
-
REAL PEDQFILI4 T
6 min ago
-
d2play best stream T
6 min ago
-
Look like now and T
7 min ago
-
Look like now and T https://exe.io/C2aeF
8 min ago
-
100 Latestnew Dōods T https://exe.io/xLTdcA
10 min ago
-
Sucked a nerd during the game, the only way to distract him [ENG SUB]
10 min ago
-
Mega folder T
10 min ago