while-loop tag

27 questions


1 answers
423 views
0
For, while

For statement hap=0for n in range(1234,4568): if n%444 ==0: hap += nprint(hap)How do I change this to a while statement

1 years ago

2 answers
127 views
0

1 answers
132 views
0
Multiple While questions

...... int sum=0, num=0, i=0;while(i<5){ while(num<=0) {printf(Enter a number greater than 0): , i+1); scanf(%d, &num); } sum+=num; num=0; i++;}printf(total: %d \n, sum);return 0;}If I ent...

1 years ago

1 answers
141 views
0
I want to write a code that ends when I enter the Python while door, how can I implement it?

n = input('Enter the student's name and grade)\nExample) David 537548 :')while n=='\n': n1,n2,n3,n4 = n.split() n2 = int(n2) n3 = int(n3) n4 = int(n4) L.append(n1) M.append([n2,n3,n4]) Avg.append(int(...


2 answers
93 views
0
There is a part of the sentence that I don't understand about the mistake

1.#include <stdio.h>int main(void){ double a,b; scanf(%lf %lf,&a,&b); while( a < b ){ printf(%0.2lf ,a); a = a+0.01; }}2.#include <stdio.h>int main(void){ int a,b; scanf(%d %d...

1 years ago

1 answers
83 views
0
What do you mean by scanf in this while statement is 3?

while(scanf(%d %s %s, &s[n].id,s[n].name,s[n].major)==3) n++;What do you mean 3?

1 years ago

1 answers
80 views
0
Python while question

Below is the width-first search algorithm codeGo back without errors and the answer is Thom.But in the while door, whilesearch_queue:while search_queue == True:I shouldn't have used it like thisWhat i...

1 years ago

1 answers
133 views
0
I have a question for Python while.

def binary_search(array, goal): low = 0 high = len(array) - 1 while low <= high: mid = (low + high) // 2 if goal > array[mid]: low = mid + 1 elif goal < array[mid]: high = mid - 1 else:...

1 years ago

2 answers
91 views
0
Put another array value in the Python for statement array.

aa.pyrecords1 = [(a,1),(b,2),(c,3)]records2 = [(a1,4)]# Each array value has a records2 value as many as the number of records2 value.i = 0while i < len(records1): records1[i].append(records2) i = ...


1 answers
82 views
0
This is a question about the state of putting the try-catch inside the while.

public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println (Determine if the digit 10 and the digit 1 are the same.); System.out.println (Enter 0 to stop; Sy...

1 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.