0
I don't know what to put
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
+ 2
Christian Joseph Marigmen
You always ask solution without showing attempts. Atleast try and show something to us.
1 minute = 300 letters
20 minutes = ?
+ 1
Christian Joseph Marigmen it's nothing just multiply the input with 300.
For example:
int n;
cin>>n;
cout<<n*300;
And if you still having problems then kindly show your attempt âşď¸
+ 1
Christian Joseph Marigmen
If 300 letters in 1 minutes then how many letters in 20 minutes? How you will calculate this?
+ 1
Christian Joseph Marigmen
You got it but this was very simple calculation. If you stuck in simple calculation it means you have to learn a lot and practice also.
0
#include <iostream>
using namespace std;
int main() {
int count = 300; // letter in a minute
int time;
cin >> time;
//your code goes here
*= << count
cout << count << endl;
return 0;
}
0
Thanks for answering my question. I get it now. âď¸
0
I'm probably an idiot, but can you tell me exactly what the resulting code should look like? Thanks