- #1
rawxlimits
- 1
- 0
A drink costs 2 dollars. A taco costs 3 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 4 drinks and 6 tacos yields totalCost of 26.
Can someone help me learn to write this i have multiple assigntments i don't undeerstand the question its asking me to write inside the field i posted above
Code:
import java.util.Scanner;
public class ComputingTotalCost {
public static void main (String [] args) {
int numDrinks = 0;
int numTacos = 0;
int totalCost = 0;
numDrinks = 4;
numTacos = 6;
<____*MY section to fill out*
System.out.print("Total cost: ");
System.out.println(totalCost);
return;
}
}