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
trapecia [35]
2 years ago
11

Assume variables SimpleWriter out and int n are already declared in each case. Write a while loop that printsA. All squares less

than n. For example, if n is 100, print 0 1 4 9 16 25 36 49 64 81.B. All positive numbers that are divisible by 10 and less than n. For example, if n is 100, print 10 20 30 40 50 60 70 80 90C. All powers of two less than n. For example, if n is 100, print 1 2 4 8 16 32 64.
Computers and Technology
1 answer:
REY [17]2 years ago
5 0

Answer:

This program has been written using JAVA. The code is written beloe:

// import library

import java.util.Scanner;

public category Main operate

public static void main(String[] args)

{

// scanner category

Scanner scan=new Scanner(System.in);

System.out.println("Enter Number:");

int n=scan.nextInt();

//All squares but n

System.out.println("All squares but n are: ");

int temp=0,square=0,i=0;

while(square

range

square=i*i;

if(square>=n)break;

System.out.print(square+" ");

i++;

}

//All positive numbers that are divisible by 10 but less than n

System.out.println(" ");

System.out.println(" ");

System.out.println("All positive numbers are divisible by 10 and less than n are: ");

i=1;

while(i

{

if(i%10==0)

System.out.print(i+" ");

if(i>=n)break;

i++;

}

System.out.println(" ");

System.out.println(" ");

System.out.println("All powers of 2 that are less than n are: ");

//All powers of 2 less than n

i=0;

while(i

mathematics.pow(2, i);

if(num_power

System.out.print(num_power+" ");

i++;

}

}

}

Explanation:

With SimpleWriter out and int n already declared in each case this program makes use of a while loop condition to satisfy the following;

1. All squares less than n

2. positive numbers that are divisible by 10 and less than n.

3. All powers of two less than n.

You might be interested in
Jean has created a database to track all of this month’s family meals. To find an entry for lasagna, what would should Jean do?
Nutka1998 [239]
A or d


A edit data

And
.
,
D sort of data
6 0
3 years ago
Which activities below might have a negative effect on your online reputation?
Zepler [3.9K]

Answer:

I believe the last 2 maybe even the one above the second to last answer

Explanation:

3 0
3 years ago
Putting the word int into a code will create a string variable?
loris [4]

Answer:

Yes it will create a string variable

4 0
3 years ago
A maxillary partial denture will have a ____ connector, and the mandibular partial denture will have a ____ connector.
spayn [35]

The answer to the maxillary partial denture and the mandibular partial denture respectively are; Palatal connector and Lingual Connector

<h3>Understanding Dental Health</h3>

Maxillary partial denture is a dental prosthetic that allows for the placement of a series of artificial teeth in an area in the upper jaws where healthy teeth used to exist.

Meanwhile, Mandibular Partial Denture is a dental prosthetic that allows for the placement of a series of artificial teeth in an area in the lower jaws where healthy teeth used to exist.

Now, a maxillary partial denture has a palatal connector while a mandibular partial denture has a lingual connector.

Read more about dental health at; brainly.com/question/24345244

8 0
2 years ago
Technical colleges offer certification in audio engineering through programs that are normally from 2 to 6 months long.
Murrr4er [49]

Answer:

False

Explanation:

i said so

8 0
3 years ago
Other questions:
  • Why does the PC send out a broadcast ARP prior to sending the first ping request
    12·1 answer
  • A statement describing both the requirements that must be met by a product or process amd the ways in which satisfaction of the
    8·2 answers
  • To display the Color gallery, with the graphic selected, click the Color button in the ____ group on the PICTURE TOOLS FORMAT ta
    14·1 answer
  • ____ technology is the same as that used in digital watches, or the time display on a microwave oven
    14·1 answer
  • Write smallest to largest: Byte, bit, MB, PB, GB, nibble
    12·2 answers
  • You insert a comment in a worksheet by using a command on the ____ tab on the Ribbon.
    13·1 answer
  • ................. are used to summarize data (option) (a) report (b) action ​
    12·2 answers
  • Help!!!
    8·1 answer
  • How many times is the body of the loop executed?
    8·1 answer
  • Describe a NIC card and can you have more than one?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!