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
If Anime Characters were real , Who Would Your Anime Wife Would Be (Tell Who And Why)
ehidna [41]

Answer:

Runa, because  she’s like me I r l lol

Explanation:

3 0
2 years ago
Each contestant auditioned her singing voice for the pageant. Participle: Word it Modifies:​
irakobra [83]

Answer:

participle is singing

word it modifies is voice

4 0
3 years ago
What is the name for the individual sections of the ribbon in PowerPoint 20162
Julli [10]

Answer:

Tabs

Explanation:

The ribbon contains the tabs. The tabs contain the command groups which hold commands

IF THIS HELPS PLEASE MARK THIS ANSWER AS BRAINLIEST

6 0
3 years ago
Which of the following is not an example of plagiarism?
OLga [1]
The answer that isn't an example of plagiarism would be 'D. Quoting with Source' that means you are giving credit where credit is due and not taking or copying other work which is the definition of plagiarism.

I'm not sure about the second one but I believe it might be 'A. Students and Teachers'. 

Hope this helped!
8 0
3 years ago
Which of the statements below is false? Question 19 options: a) You can install a 64-bit operating system on a 64-bit machine. b
diamong [38]

you can install a 64 bit operating system on a 32 bit machine.

hope this helps!

5 0
3 years ago
Other questions:
  • Write a program with a function that accepts a string as an argument and returns a copy of the string with the first character o
    11·1 answer
  • Quiz
    6·2 answers
  • Write a C++ program in which you declare variables that will hold an hourly wage, a number of hours worked, and a withholding pe
    12·1 answer
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    7·1 answer
  • How do i make spaces in python<br> To draw hello world
    15·1 answer
  • Given a number count the total number of digits in a number
    12·1 answer
  • Ryo currently earns a monthly salary of $2200. She has been offered a raise of $250 per month. How much more will she earn per y
    14·1 answer
  • What are acenders? What are decenders?
    10·2 answers
  • Based on the following quote from Leonardo Da Vinci, what would be his definition of a fine artist? “Principles for the Developm
    11·2 answers
  • What is the difference between PowerPoint and Outlook?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!