- 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)
10 Answers
+ 3
than?
+ 3
digit2 + digit3 < k
digit1 > ???????????????????
+ 2
I think he means digit1 > digit2+digit3+1
if so, 911 would work ^w^ probably should call them tho
+ 2
let K be 3
then N = 911 still works :)
+ 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
}
+ 2
You're welcome, btw this is JavaScript
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
0
I need to compile a program that prints true and false
0
Thank you so much
0
Oh, I need python