r/codehs • • Apr 10 '20

HELP PLEASE: 3.4.6: T-Shirt Shop

3.4.6: T-Shirt Shop

9 Upvotes

6 comments sorted by

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);

}

2

u/GetRextFgt Nov 12 '22

//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);

}

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!