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
We introduced Sudoku as a CSP to be solved by search over
klemol [59]

Answer:

It can be a really good approach to use a local solver using the min conflicts heuristic in solving sudoku problems. It will work better actually. In this process, the value chosen is the value with the minimum conflicts. This is the general way a normal person would also tackle this problem. By this approach, if we keep taking the values with minimum conflicts the sudoku puzzle can be solved with a better performance.

Explanation:

8 0
2 years ago
Why is it good to be a computer programmer?​
liubo4ka [24]

Answer:

It's your wish become other professions like doctor, engineer are also good. But in this profession you can make apps, websites and can do hacking. Which is are cool things to do. But every profession is best at it's profession.

Explanation:

If you like my answer than please mark me brainliest

5 0
2 years ago
What do you need to know when buying screws<br>​
ozzi
The length and the width
6 0
2 years ago
Read 2 more answers
If the firewall is configured for credential phishing prevention using the "Domain Credential Filter" method, which login will b
ahrayia [7]

Mapping to the IP address of the logged-in user<u>-will detect  a credential theft</u>

<u></u>

Explanation:

In the "Domain Credential Filter" method the firewall matches the username and the password submitted by the user with the corporate user id and password.

In order to match the credentials submitted by the user the firewalls retrieves data from the bloom filter which is further connected  to windows  User-ID credential service add-on.

The firewall also looks in its Mapping Table for the IP address of the logged-in user

3 0
3 years ago
D. The 7-bit ASCII code for the character '&amp;' is:
insens350 [35]

Answer:

00100110

a and d are invalid sequences because they contain an even number of 1's.

Explanation:

Odd parity means that you want an odd number of 1's in the resulting set of bits. Since there are 3 (=odd) bits in the set, a zero must be added to keep the total odd.

6 0
3 years ago
Other questions:
  • How does climate research depend on digital technology
    12·1 answer
  • To read visual and audio text means
    11·1 answer
  • Where should you click to edit an existing formula?
    12·2 answers
  • What are three responsibilities of an operating system? please answer quick!!!
    9·1 answer
  • A robot worker and a human worker are both vulnerable to
    5·1 answer
  • if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
    7·1 answer
  • Owen is writing a program that will lock his computer for one hour if the incorrect password is entered more than five times. Ha
    14·1 answer
  • After selecting the Slide Master tab (within the View tab), which actions can a user take to configure a slide master?
    8·1 answer
  • Jade has to create a workbook for storing information of students participating in the annual state-level sports competition. Th
    5·1 answer
  • A parent process calling _____ system call will be suspended until children processes terminate.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!