vendredi 24 mai 2019

Write a program that must call a method/function. No printing or reading of input should be done from the inside

Assume the cost of a laptop is 2000 and a person wants to buy 3 laptops. Write a program that must call a method/function, named calculatePrice, which takes as input two numbers and returns the cost (e.g. 6000). The program should then print the cost as output. No printing or reading of input should be done from inside the calculatePrice method/function.

Aucun commentaire:

Enregistrer un commentaire