Question: Please answer these questions and I will give you a thumb up Integer variable numYards is read from input. Type cast numYards to a double.


Integer variable numYards is read from input. Type cast numYards to a double. Ex: If the input is 94 , then the output is: 94.0 A drink costs 2 dollars A taco costs 3 dollars. Given the number of each, compute total cost and assign totalCost with the result. Ex: 4 drinks and 6 tacos yields totalCost of 26. Code writing challenge activity dema 5678910111213141516171819}Scannerscnr=newScanner(System,in);intnumDrinks;intnumTacos;inttotalCost;numDrinks=scnr.nextint();numTacos=scnr.nextInt();YoursolutiongoeshereSystem.out.print("Totalcost:");System.out.println(totalCost);3 Integer variable numMinutes is read from input. Type cast numMinutes to a double. Ex: If the input is 8 , then the output is: 8.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
