0
I’m missing something here
function main() { var seconds = parseInt(readLine(), 10) // Your code here var seconds= i =0 while (i<=4) document.write(i<=4; <br/>) }
20 Respuestas
+ 1
I'll put in comments. I think that some of these codes you need to reread and learn from again.
function main() {
var seconds = parseInt(readLine(), 10)
/* the "var seconds" is a variable that allows the user/system to have an input */
// Your code here
var seconds= i =0
/* Here you have changed the variable "var seconds" and you shouldn't (you have also done it incorrectly) */
while (i<=4)
document.write(i<=4; <br/>)
/* you are using a while loop but you don't have anything that will make the while condition "false", so it will repeat forever. */
}
Please, read the lessons again. Pay attention to the code examples they have - write them down exactly as they have them. Re-write them into the code playground. If it doesn't work, look back at your written notes and check your code.
+ 1
function main() {
var seconds = parseInt(readLine(), 10)
// Your code here
while( seconds >= 0 ) {
console.log(seconds) ; // print
scconds--; //decrement seconds
}
}
// this is what I mean. Already posted. try it
+ 1
Sorry about that thank you for helping me really appreciate it
+ 1
Hi Ryzell Mae Malabanan please create your own post for your problem. When you do it, add your text to the description and attach your code from the code playground.
That way, someone can find your error and help you with it.
0
Write a program-timer, that will take the count of seconds as input and output to the console all the seconds until timer stops.
Sample Input
4
Sample Output
4
3
2
1
0
0
It says im missing ) somewhere
0
variable I needs to be incremented in the while loop
0
Give me the answer ill figure it the
0
Then
0
function main() {
var seconds = parseInt(readLine(), 10)
// Your code here
var i=0
while (i<=4){
console.log (seconds; i <=4)
}
0
while( seconds >= 0 ) {
console.log(seconds) ;
scconds--; // decrement seconds
}
// you don't need i then. If you want use i instead of seconds by using
var i=seconds;
0
var i = seconds
while (seconds <=0){
console.log (i<=4;) seconds--;
0
Emmanuel Pena
Why you posted your last reply..?
What your expectation by that?
What are you looking for...?
0
I still didnt get it
0
function main() {
var seconds = parseInt(readLine(), 10)
// Your code here
var i = 0;
while (i<=4){
document.write(i)
}
0
To count down 43210
0
function main() {
var seconds = parseInt(readLine(), 10)
// Your code here
var i = 0;
while (i<=4) {
document.write(i - "<br />");i++
}
Tried this one too
0
Thank u finally !!
0
"Give me the answer ill figure it then"
Emmanuel Pena
The problem is, we have been giving you the answer and you are making the same mistakes.
0
Create program Fare that computes discount of passenger. Use the given table:
If code is not within the selection make all output zero. Use switch case on your solution.
Sample input/output:
Enter Discount for Ordinary Passenger: 0
Business class additional Fare for Ordinary Passenger: 1000.00
Enter Discount for Student Passenger: 5
Business class additional Fare for Student Passenger: 700.00
Enter Discount for Senior Citizen Passenger: 10
Business class additional Fare for Senior Citizen Passenger: 500.00
Enter fare: 8000.00
Passenger type [O,S,C]: C
Travelling in business class [Y/N]: Y
Discount: 800.00 pesos
Business class charge: 500.00 pesos
New fare: 7,700.00 pesos