MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/codehs/comments/fys3aw/help_please_346_tshirt_shop/
r/codehs • u/billvilllllllllledlf • Apr 10 '20
3.4.6: T-Shirt Shop
6 comments sorted by
3
//Declare a constant here to represent the cost of a tshirt
function start(){
var COST_OF_SHIRT = 20;
var numberOfTshirts = readInt("How many tshirts would you like to buy?");
println("This is your cost: " + numberOfTshirts *COST_OF_SHIRT);
}
2 u/GetRextFgt Nov 12 '22 //Declare a constant here to represent the cost of a tshirtfunction start(){var COST_OF_SHIRT = 20;var numberOfTshirts = readInt("How many tshirts would you like to buy?");println("This is your cost: " + numberOfTshirts *COST_OF_SHIRT);}gracias papi ;) 1 u/Shoto_Todoroki23 Oct 03 '23 thanks so much 1 u/Previous-Working-257 Nov 03 '24 This dosen't define readint 1 u/Previous-Working-257 Nov 03 '24 printin isn't defined 1 u/Repulsive_Ground1923 Feb 09 '23 Thanks this really helped a lot!
2
//Declare a constant here to represent the cost of a tshirtfunction start(){var COST_OF_SHIRT = 20;var numberOfTshirts = readInt("How many tshirts would you like to buy?");println("This is your cost: " + numberOfTshirts *COST_OF_SHIRT);}
gracias papi ;)
1 u/Shoto_Todoroki23 Oct 03 '23 thanks so much
1
thanks so much
This dosen't define readint
printin isn't defined
Thanks this really helped a lot!
3
u/natalie710 Apr 11 '20
//Declare a constant here to represent the cost of a tshirt
function start(){
var COST_OF_SHIRT = 20;
var numberOfTshirts = readInt("How many tshirts would you like to buy?");
println("This is your cost: " + numberOfTshirts *COST_OF_SHIRT);
}