运行下列程序,最后的输出结果为。
num=9
if num>8:
print(num)
num=9
if num>8:
print(num)
举一反三
- 下列程序的输出结果是:num = 16 while Ture: if num [12 and num ]=10: print (num) break num = num – 2 print (num) A: 10 B: 12 C: 14 D: 16
- 有下列程序: num=6 while num>0: num=num-2 print(num)
- 下列程序的输出结果是() num = 27 count = 0 while num > 0: if num % 2 == 0: num /=2 elif num % 3 ==0: num /= 3 else: num -=1 count += 1 print (count)
- 下列程序运行后的输出结果为。 # include <stdio.h> int num; void fun { printf ( "%d, ", num ); } int main { int num = 3; fun ; printf ( "%d,", num ); return 0; }
- 当运行测试输入6789时,写出下面Python程序的执行结果。num=int(input(“请输入一个整数:”))while(num!=0): print(num%10,end=' ‘ ) num=num//10