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
-
Makers CBD Gummies(2024) 100% Safe, Does It Really Work Or Not?
2 min ago
-
MOFOS - Amy Amor Tells Jordi El His Idea Of What She Should Do On Her First Blind Date
3 min ago
-
https://www.facebook.com/SuperiorCBDGummiesInCa/
19 min ago
-
POV: Creampied by my Bumble Date
32 min ago
-
Sugar Defender Tom Green
56 min ago
-
ygbyhgytrgfytrgfrtfg
57 min ago
-
FIST4K. Curious nymph tries fisting during affair with BF in living room
1 hour ago
-
Makers CBD Gummies Reviews
1 hour ago
-
Life Boost CBD Gummies - FACTS, SCAM UPDATED PRICE 2024
1 hour ago
-
https://www.facebook.com/CerebrozenReviews/
1 hour ago