+ 1
Please how can I solve this matter?
A robot can type 300 letters per minute. The given program takes the text input time (in minutes). Task Complete the code to calculate and output the number of letters that will be typed in a given time. Sample Input 20 Sample Output 6000 Hint To calculate the length of the text, you need to multiply the time by a count (letters per minute).
7 Answers
+ 1
Please how can help me solve this?
You are making a currency converter app.
Create a function called convert, which takes two parameters: the amount to convert, and the rate, and returns the resulting amount.
The code to take the parameters as input and call the function is already present in the Playground.
Create the function to make the code work.
Sample Input:
100
1.1
Sample Output:
110
+ 8
Show your attempt first
+ 2
int count = 300;
int time;
cin >> time;
cout << count*time << endl;
+ 1
int time=0;
cin >> time ;
cout << " No. Of letters = " << time * 300<< endl;
+ 1
function main() {
var amount = parseFloat(readLine(), 10);
var rate = parseFloat(readLine(), 10);
function convert (a,b){
var c = a * b;
return c
}
console.log(convert(amount, rate));
}
+ 1
Thanks too Jackie and what about this?
You are working on a Contact Manager app.
You have created the contact object constructor, which has two arguments, name and number.
You need to add a print() method to the object, which will output the contact data to the console in the following format: name: number
The given code declares two objects and calls their print() methods. Complete the code by defining the print() method for the objects.
0
Jamilu Abubakar Sadiq
Inside the print method just write
return this.name + ':' + this.number