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
ddd [48]
2 years ago
8

Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has

already been declared , use a while loop to print a single line consisting of n asterisks. thus if n contains 5, five asterisks will be printed. use no variables other than n and j.
Computers and Technology
1 answer:
Ugo [173]2 years ago
8 0
While( n )  /*when n == 0, will fail*/
{
   putchar( '*' );  /*effectively print asterick*/
   n--;    /*post-decrement n*/
}
You might be interested in
PLEASE HELP ASAP!!!
Studentka2010 [4]

If you are using CSS :

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

HTML

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

for HTML:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Sample table</title>

<style>

table {

   border-collapse: collapse;

   border: 5px solid black;

   width: 100%;

}

td {

   width: 50%;

   height: 2em;

   border: 1px solid #ccc;

}

</style>

</head>

<body>

<table>

   <tbody>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

       <tr><td></td><td></td></tr>

   </tbody>

</table>

</body>

</html>

3 0
3 years ago
How to get administrator privileges on windows 7?
Phoenix [80]
If you are on the admin account, you will already have them, but if you are on a different account, it's pretty impossible But you can get through by using command prompt.
4 0
3 years ago
What will cloud cumputing offer
seropon [69]
Cloud computing allows computers from all around the world that are not being used to be able to do extra computations. This removes many of the limitations of a single computer and lets the user calculate things much faster.
6 0
3 years ago
Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variable
levacccp [35]

Answer:

if (pH<7.0){

          neutral=0;

          base=0;

          acid=1;

      }

      else if (pH>7.0){

          neutral=0;

          base=1;

          acid=0;

      }

      else if (pH==7.0){

          neutral=1;

          base=0;

          acid=0;

      }

Explanation:

As required by the question, if and else statements have been used to test the value of the pH and assign the apropriate values to the variables neutral, base and acid.

The code snippet below can be used to prompt the user to enter values for pH

<em>import java.util.Scanner;</em>

<em>public class pHTest {</em>

<em>   public static void main(String[] args) {</em>

<em>      Scanner scr = new Scanner(System.in);</em>

<em>       System.out.println("Enter a value for the pH");</em>

<em>       int neutral, base, acid;</em>

<em>       double pH = scr.nextDouble();</em>

<em> if (pH<7.0){</em>

<em>           neutral=0;</em>

<em>           base=0;</em>

<em>           acid=1;</em>

<em>       }</em>

<em>       else if (pH>7.0){</em>

<em>           neutral=0;</em>

<em>           base=1;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>       else if (pH==7.0){</em>

<em>           neutral=1;</em>

<em>           base=0;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>} }</em>

4 0
3 years ago
Read 2 more answers
20
denis-greek [22]

Answer:

true

Explanation:

because my 8 ball said so

6 0
3 years ago
Other questions:
  • Where can you access email accounts on your windows 7 computer in order to modify current accounts or create new ones?
    5·1 answer
  • In what country did true printing first take place?
    12·2 answers
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • Which tool could be used to display only rows containing presidents who served two terms?
    8·2 answers
  • Most networking media send data using _____ in which data is represented by only two discrete states: 0s and 1s.
    15·2 answers
  • What three things in the third generation of computing helped get programming enthusiasts more involved with computers? Select 3
    12·2 answers
  • 3. Which of the following is called address operator?<br> a)*<br> b) &amp;<br> c).<br> d) %
    12·1 answer
  • Which of the following describes the line spacing feature? Select all that apply. adds space between words adds space between li
    8·1 answer
  • Tier 1 networks form the internet ____.​
    15·1 answer
  • Please answer quick :(​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!