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
dexar [7]
3 years ago
6

Given an int variable n that has already been declared and initialized to a positive value , use a while loop to print a single

line consisting of n asterisks. Use no variables other than n.
Computers and Technology
1 answer:
Scrat [10]3 years ago
8 0

Answer:

The code to this question can be given as:

Code:

int n=5; //define an integer variable n and assign a positive value.

while(n > 0) //define while loop,

{

printf("*"); //print asterisks.

n --; //decrements value.

}

Explanation:

The description of the above code can be given as:

  • In this code we define an integer variable that is "n" and assign a positive value that is "6".
  • Then we define a while loop. It is an entry control loop which means it will check condition first then executes. In this loop, we use variable n and check condition that the value of n is greater than 0.
  • In this loop, we print the asterisks and decrease the value of n. When the variable n value is 0. It will terminate the loop and print asterisks.

You might be interested in
The top-level domain (tld), also known as the ________, typically identifies the type of organization an address is associated w
Contact [7]

The top-level domain (TLD), also known as the domain suffix, typically identifies the type of organization an address is associated with . (dot)

The top-level domain is the last part of the domain name i.e the part after the final dot. The tld identifies what kind of organization the domain belongs to and classifies its purpose. For example, “.com “is for commercial businesses and “.gov” is for governmental institutions.

There are three main types of top-level domains;

  1. Generic TLDs: They cover the most common domain names like “.com”,” .net” and “.org”.
  2. Country-code TLDs: These domains are reserved for use by certain countries and states like “.uk”, “.pk”, “.au”.
  3. Sponsored TLDs: These are usually representative of any geographical or professional communities with a delegated sponsor who represents them.

You can learn more about domain name at

brainly.com/question/10314541

#SPJ4

3 0
1 year ago
Write. true or false​
ella [17]
Um I need a image or smth
8 0
3 years ago
Read 2 more answers
Seven basic internal components found in a computer tower
Yuliya22 [10]
Power supply unit, central processing unit (CPU), hard disk drive (HDD), RAM modules, motherboard, video card, sound card etc.
4 0
3 years ago
WOULD SOMEONE PLEASE ANSWER THIS IVE ASKED TWICE ALREADY!
Rainbow [258]
I think that’s right, hope it helps!:) brainliest??

7 0
3 years ago
State one advantage of organising data into columns and rows
Bezzdna [24]
It's neat organized and ready to find when needed
6 0
3 years ago
Other questions:
  • A search engine displays a list of webpage names that contain the search text. what is the term for that list?
    14·1 answer
  • To type the letter address, _________ space from the dateline
    9·2 answers
  • If the pc-doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    9·1 answer
  • Invalid length parameter passed to the LEFT or SUBSTRING function (below)".
    6·1 answer
  • Which statement is most likely to be true about a computer network?
    11·2 answers
  • A cyber community is different than a physical community because _________________. A.people can go to restaurants to meet frien
    13·1 answer
  • Documenting Business Requirements helps developers control the scope of the system and prevents users from claiming that the new
    13·1 answer
  • What of the following is not a benefit of active listening
    8·2 answers
  • Long Answer Questions: a. Briefly explain the types of Control Structures in QBASIC.​
    5·1 answer
  • How can blockchain be used to support sustainable business practices?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!