Результаты екзамена | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Результаты екзамена

Парю себе мозги уже третий день( Помогите решить Результаты экзамена будут определены следующим образом: Если результат равен 88 и выше => excellent 40-87 => good 0-39 => fail Вам дана программа, которая принимает результат в качестве входных данных. Задача Завершите код, чтобы выводить соответствующий результат (excellent, good, fail) в консоль.

31st Oct 2021, 6:33 PM
Білецький Михайло
8 Answers
+ 3
var score = parseInt( 90) /* 88 and above => excellent 40-87 => good 0-39 => fail */ // ваш код var x=88; var y=40; var z=39; if(score<=z){console.log("fail")} if(y<=score&&score<x){console.log("good")} if(score>=x){console.log("excellent") };
31st Oct 2021, 6:58 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Write your question in English language
31st Oct 2021, 6:38 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
This is very simple if you know about conditionals statement First take one inputs Then in if condition write like this If(result>88) print("excellent"( else if(result>40&& result<87) print ("good") else Print fail
31st Oct 2021, 6:45 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Link your code here whenever you post your question
31st Oct 2021, 6:52 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
thanks, I just fixed it)
31st Oct 2021, 7:03 PM
Білецький Михайло
0
The exam results will be determined as follows: If the result is 88 and up => excellent 40-87 => good 0-39 => fail You are given a program that takes a result as input. Task Complete the code to output the appropriate result (excellent, good, fail) to the console.
31st Oct 2021, 6:41 PM
Білецький Михайло
0
well, I realized my mistake. that's how i first wrote the code
31st Oct 2021, 6:51 PM
Білецький Михайло
0
var score = parseInt(readLine(), 10) /* 88 and above => excellent 40-87 => good 0-39 => fail */ // ваш код var x=88; var y=40; var z=39; if(score<=z){console.log("fail")} else(y<=score<x){console.log("good")} else if(score>=x){console.log("excellent")}
31st Oct 2021, 6:52 PM
Білецький Михайло