- 1

Help(Help me write a program)I need to compile a program that prints true and false

The sum of the last two digits of a given three-digit number N is less than a given number K, and the first digit is greater than 5 (I need to compile a program that prints true and false)

11th Oct 2017, 7:15 AM
Daniil
10 Respuestas
+ 3
than?
11th Oct 2017, 7:17 AM
Meharban Singh
Meharban Singh - avatar
+ 3
digit2 + digit3 < k digit1 > ???????????????????
11th Oct 2017, 7:41 AM
Meharban Singh
Meharban Singh - avatar
+ 2
I think he means digit1 > digit2+digit3+1 if so, 911 would work ^w^ probably should call them tho
11th Oct 2017, 7:23 AM
Dapper Mink
Dapper Mink - avatar
+ 2
let K be 3 then N = 911 still works :)
11th Oct 2017, 7:48 AM
Dapper Mink
Dapper Mink - avatar
+ 2
oh then n = prompt("number?",""); k = prompt("number?",""); if(Number(n.charAt(0)) > 5 && Number(n.charAt(1))+Number(n.charAt(2)) < Number(k)){ //true }else{ //false }
11th Oct 2017, 7:55 AM
Dapper Mink
Dapper Mink - avatar
+ 2
You're welcome, btw this is JavaScript
11th Oct 2017, 7:56 AM
Dapper Mink
Dapper Mink - avatar
0
The sum of the last two digits of a given three-digit number N is less than a given number K, and the first digit is greater than 5
11th Oct 2017, 7:44 AM
Daniil
0
I need to compile a program that prints true and false
11th Oct 2017, 7:50 AM
Daniil
0
Thank you so much
11th Oct 2017, 7:56 AM
Daniil
0
Oh, I need python
11th Oct 2017, 7:58 AM
Daniil