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
notka56 [123]
2 years ago
14

Write a program whose input is two integers. Output the first integer and subsequent increments of 10 as long as the value is le

ss than or equal to the second integer.
Computers and Technology
1 answer:
Lubov Fominskaja [6]2 years ago
3 0

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter two integer numbers");

       int num1 = in.nextInt();

       int num2 = in.nextInt();

       int newSum=num1+10;

       System.out.println("The first number is "+num1);

       do{

          System.out.println(newSum);

          newSum +=10;

       }while (newSum <=num2);

   }

}

Explanation:

Using Java Programming language

  1. Prompt user for the two inputs and save them as num1 and num2(Using the scanner class)
  2. Create a new Variable newSum = num1+10
  3. Create a do...while loop to continually print the value of newSum, and increment it by 10 while it is less or equal to num2
You might be interested in
The security administrator of ABC needs to permit Internet traffic in the host 10.0.0.2 and UDP traffic in the host 10.0.0.3. Al
koban [17]

Answer:

The correct selection is the letter C. The first ACL is denying all TCP traffic and the other ACLs are being ignored by the router.

Explanation:

In this case, the letter C is the right answer because with the first ACL exactly:

access-list 102 deny tcp any any

We are denying all traffic with the next line deny tcp any any, in this case, the others line are being ignored.

access-list 104 permit udp host 10.0.0.3 any

access-list 110 permit tcp host 10.0.0.2 eq www any

access-list 108 permit tcp any eq ftp any

For that nobody can access to the internet, the security administrator of ABC must change the first ACL.

5 0
3 years ago
What is a computer meaning
goldenfox [79]

Answer:

computer means an electronic machine which process raw data and gives meaningful information to the user

7 0
3 years ago
Information dashboards enable ________ operations that allow the users to view underlying data sources and obtain more detail.
Alja [10]

I believe what you meant is Performance Dashboard and the correct answer is drill-down/drill-through

Prοvidе visual displays οf impοrtant infοrmatiοn that is cοnsοlidatеd and arrangеd οn a singlе scrееn sο infο can bе digеstеd at a singlе glancе.

4 0
2 years ago
write a function that counts the number of times the value of y occurs in the first n values in array x. y is an integer variabl
mixer [17]

Answer:

Following are the function of count:

void count(int y,int x[],int n) // function definition of count

{

int k,count=0;  // variable declaration

for(k=0;k<n;++k) // iterating over the loop

   {

   if(x[k]==y) //check the conndition number of times the value of y occurs

   {

   count++; // increment of count by 1

   }

   }

Explanation:

Following are the code in c language

#include <stdio.h> // header file  

void count(int y,int x[],int n) // function definition of count

{

int k,count=0;  // variable declaration

for(k=0;k<n;++k) // iterating over the loop

   {

   if(x[k]==y) //check the conndition number of times the value of y occurs

   {

   count++; // increment of count by 1

   }

   }

   printf(" the number of times the value of y occurs :%d",count); // display count value

   }

int main() // main method

{

   int x[100],y,n,k; // variable declarartion

   printf(" Enter the number of terms n :");

   scanf("%d",&n); // input the terms

   printf(" Enter the array x :");

   for(k=0;k<n;++k) // input array x

   {

   scanf("%d",&x[k]);

   }

   printf("Enter the value of y:");

   scanf("%d",&y);// input value y by user

    count(y,x,n); // calling function

   return 0;

}

In the given program we declared an array x ,variable  y and n respectively Input the array x ,y,n  by user after that we call the function count .In the count function we iterate the loop from o position to array length-1 and check the number of times the value of y occurs by using if statement  i.e  if(x[k]==y) if the condition of if block is true then we increment the count variable Otherwise not .Finally display the count variable which describe the number of count.

Output

Enter the number of terms n :5

1

2

2

56

5

Enter the value of y:2

the number of times the value of y occurs :2

Enter the number of terms n :5

1

2

3

56

5

Enter the value of y:26

the number of times the value of y occurs :0

7 0
2 years ago
Which term describes a protocol to manage a network, able to configure a network, monitor activity, and control devices?
natali 33 [55]
The answer is c post office protocol version 3 (POP 3)
7 0
2 years ago
Other questions:
  • If you need to use a custom theme frequently, you can save a presentation file as a(n) ____ theme file.
    12·2 answers
  • an object or device outside the computer, that one would plug into a port to control the functions of a computer are?
    9·2 answers
  • Which of the following roles is responsible for writing programming code?
    10·1 answer
  • In a relational database, the three basic operations used to develop useful sets of data are:
    10·1 answer
  • If I dribbled on my motherboard and I used windex to clean off the spit would it still work ?
    11·2 answers
  • A finally clause will execute:
    8·1 answer
  • Which IDEs support multiple high-level programming languages? Select all that apply.
    14·2 answers
  • Select the correct answer.<br> What do you understand by "exposition"?
    10·2 answers
  • When typing lists in a document, you must use single-spacing between each item in the list.
    8·1 answer
  • What type of bus does PCI use?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!