1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
galina1969 [7]
3 years ago
6

How to Create a while loop

Computers and Technology
2 answers:
Marta_Voda [28]3 years ago
6 0
While (condition) ( < > =< => = !+) 
{
    code block
<span>}

some think like this 

</span>
kap26 [50]3 years ago
4 0
For C/C++ , C# for while loop has the same layout. 

while ( /*condition*/ )
{
// TO DO
}
for e.g:

int main()
 {

int sum = 0, i = 0;

//While loop
while (i <= 100)
             sum += i++;

printf("Sum %d", sum);

getchar();

return 0;

}
This code will sum from 0 to 100 ( Sigma from x = 0 to 100 of x)


You might be interested in
How does the dns help the world wide web scale so that billions of users can access billions of web pages?.
valentina_108 [34]

Answer:

domain name systems allow web users to choose where they want to go and to have many different sites

8 0
2 years ago
Coment on this if your user starts with dida
ratelena [41]

Answer:

oh sorry i needed points but i have a friend whos user starts with dida

Explanation:

8 0
2 years ago
Given four inputs: a, b, c &amp; d, where (a, b) represents a 2-bit unsigned binary number X; and (c, d) represents a 2-bit unsi
Amiraneli [1.4K]

Answer:

z = a.c' + a.b.d' + b.c'.d'

Explanation:

The truth table for this question is provided in the attachment to this question.

N.B - a' = not a!

The rows with output of 1 come from the following relations: 01 > 00, 10 > 00, 10 > 01, 11 > 00, 11 > 01, 11 > 10

This means that the Boolean expression is a sum of all the rows with output of 1.

z = a'bc'd' + ab'c'd' + ab'c'd + abc'd' + abc'd + abcd'

On simplification,

z = bc'd' + ab'c' + ac'd' + ac'd + abc' + abd'

z = ac' + abd' + bc'd'

Hope this helps!

6 0
3 years ago
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
Nana76 [90]

<u>Answer:</u>

<em>using System; </em>

<em>public class Program </em>

<em>{ </em>

<em> public static void Main() </em>

<em> { </em>

<em> String input ; </em>

<em> while(true) </em>

<em> { </em>

<em>  input = Console.ReadLine(); </em>

<em>  if(input.Equals(""quit"")) </em>

<em>  break; </em>

<em>  Reverse_String(input); </em>

<em> } </em>

<em> return; </em>

<em> } </em>

<em>static void Reverse_String(string input_text) </em>

<em>{ </em>

<em>    char[] text = input_text.ToCharArray(); </em>

<em>    Array.Reverse(text); </em>

<em>    Console.WriteLine(text); </em>

<em>} </em>

<u>Explanation:</u>

<em>In the above program a separate function is written to reverse the string.</em>

This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.

<em>In the main(), the input is obtained from the console and it is passed to the reversestring(). </em>

7 0
3 years ago
Read 2 more answers
Why are variables useful in programming?
levacccp [35]
Variables can be useful because they hold a certain number/data value that can easily be accessed and changed. For example, in a game, a players score is a variable that changes as the player gets more points; ie coins, items, etc.

4 0
3 years ago
Read 2 more answers
Other questions:
  • You have already learned about the various types of lenses. Now, conduct online research and mention as many possible types of l
    9·1 answer
  • Sam wanted to open a file that he saved yesterday. Which component inside the computer stores this file? the hard drive the fax
    13·2 answers
  • Which of the following characteristics of an e-mail header should cause suspicion?A. Multiple recipientsB. No subject lineC. Unk
    12·1 answer
  • Software design and implementation are interleaved activities. The level of detail in the design depends on the type of system b
    5·1 answer
  • O novo funcionário da equipe de desenvolvimento de sistemas está aprendendo os termos mais utilizados no dia a dia da empresa. A
    7·1 answer
  • Digital dashboards provide the decision makers with a quick overview of key performance indicators and other key operational sta
    13·1 answer
  • What is the value of the variable result after these lines of code are executed? &gt;&gt;&gt; a = 5 &gt;&gt;&gt; b = 2 &gt;&gt;&
    8·2 answers
  • Write a python statement that print the number 1000
    6·1 answer
  • 4.(L.5.1.A) Select the sentence that includes an interjection,
    12·1 answer
  • What is software?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!