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
Which of the following types of software applications would open a file
Mumz [18]
It’s C. An MP3 file is an audio/video file, so only a media player would be able to play this
8 0
3 years ago
Which of the following is not an example of a technological aid?
emmainna [20.7K]
I think the correct answer among the choices given is option A. Manipulative aids are not technological aids. It refers to items that is used to support hands-on learning like markers, toothpick or coins. Technological aids, on the other hand, are things which makes use of the new technology present like slideshows, DVD's, audioclips and projectors.
6 0
3 years ago
A common and extremely useful feature of most online dictionaries is
choli [55]
A common and extremely useful feature of most online dictionaries is <em />interoperable browser.
4 0
3 years ago
Which is one is bigger 326 kb or 60,436 kb?
Nitella [24]

60,436 is larger.

A byte is a sequence of 8 bits (enough to represent one alphanumeric character) processed as a single unit of information. A single letter or character would use one byte of memory (8 bits), two characters would use two bytes (16 bits).

7 0
3 years ago
Read 2 more answers
Which of these purchases is most likely to be paid for with a credit card
Vesna [10]

Answer:

plane ticket?

Explanation:

7 0
3 years ago
Other questions:
  • When it comes to collecting and organizing prospect and account​ information, salespeople have a large variety of computer syste
    15·1 answer
  • application that will perform a lot of overwrites and deletes of data and requires the latest information to be available anytim
    8·1 answer
  • Can some please help me learn how to make a program via Binary Code?
    7·1 answer
  • Generally considered to be the most important information security policies, what item below defines the actions a user may perf
    11·1 answer
  • A lamp outside a front door comes on automatically when it is dark, and when someone stands on the doormat outside the front doo
    7·1 answer
  • Consider the code below. When you run this program, what is the output if the temperature is 77.3 degrees Fahrenheit?
    6·1 answer
  • 100POINTS!!!!!!!!!!!!!!!!!!!I WILL ANSWER ALL OF YOUR QUESTIONS PLEASE LOVES:)))Upload your completed project including the foll
    12·1 answer
  • Which is NOT one of the basic characteristics of life? What feature of Microsoft
    5·1 answer
  • when demonstrating 2022 altima’s parking assistance, what steering feature should you mention when pointing out how easy the veh
    10·1 answer
  • When working in outline mode, press __________ and click the eye icon to change only one layer back to preview mode.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!