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]
3 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]3 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
Press the _______ key to move to the next cell in a row.
swat32
I believe it's
C. Tab
7 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Rom
Studentka2010 [4]

Answer:

// program in C++.

// headers

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// Variable

   int num;

   cout << "Enter a number between 1 and 10: ";

   // read input

   cin >> num;

   // validate input number

   while(num<1||num>10)

   {

   // if input is wrong then print error message

       cout<<"Wrong input!!Enter again:";

       // read again

       cin>>num;

   }

   // print output

   cout << "The Roman numeral for "<<num<<" is:";

   // switch

   switch (num)

   {

       case 1:

       // if input is 1

           cout<<"I"<<endl;

           // exit the switch

           break;

       case 2:

       // if input is 2

           cout<<"II"<<endl;

           // exit the switch

           break;

       case 3:

       // if input is 3

           cout<<"III"<<endl;

           // exit the switch

           break;

       case 4:

       // if input is 4

           cout<<"IV"<<endl;

           // exit the switch

           break;

       case 5:

       // if input is 5

           cout<<"V"<<endl;

           // exit the switch

           break;

       case 6:

       // if input is 6

           cout<<"VI"<<endl;

           // exit the switch

           break;

       case 7:

       // if input is 7

           cout<<"VII"<<endl;

           // exit the switch

           break;

       case 8:

       // if input is 8

           cout<<"VIII"<<endl;

           // exit the switch

           break;

       case 9:

       // if input is 9

           cout<<"IX"<<endl;

           // exit the switch

           break;

       case 10:

       // if input is 10

           cout<<"X"<<endl;

           // exit the switch

           break;

         // default

       default:

           break;

   }

return 0;

}

Explanation:

Read a number from usr and assign it to variable "num". If the input number is less than 1 or greater than 10 then ask again to enter a number until user  enter a number between 1-10 only.Then with the help of switch() function print  the equivalent Roman number.

Output:

Enter a number between 1 and 10: -5                                                                                        

Wrong input!!Enter again:12                                                                                                

Wrong input!!Enter again:6                                                                                                

The Roman numeral for 6 is:VI

7 0
3 years ago
Marisol manages the online advertising campaigns for a chain of toy stores with both a physical and an online presence. Which Go
tatiyna

Answer:

Marisol must make use of the Shopping campaign for showing the image of her products, as well as advertise her company's online as well as the local inventory of the toys, as well as boost the traffic to their site and the local toy stores. These types of ads are displayed on Google Shopping which comes just after the search results and near the responsive and text ads.

Explanation:

Please check the answer section.

8 0
3 years ago
Write a program to find the sum of first 10 even numbers in qbasic​
kipiarov [429]

Answer:

CLS. FOR I = 1 TO 10. INPUT "ENTER THE NUMBERS"; N(I) IF N(I) MOD 2 = 0 THEN S = S + N(I) ...

5 0
3 years ago
Discuss the differences between dimensionality reduction based on aggregation and dimensionality reduction based on techniques su
abruzzese [7]

Answer:

Following are the difference to this question can be defined as follows:

Explanation:

  • In terms of projections of information into a reduced dimension group, we can consider the dimension structure of PCA and SVD technologies.  
  • In cases of a change in the length, based on consolidation, there's also a unit with dimensions.
  • When we consider that the days have been aggregated by days or the trade of a commodity can be aggregated to both the area of the dimension, accumulation can be seen with a variance of dimension.
5 0
3 years ago
Other questions:
  • Unix has experimented with several security programs. a user can attach a watchdog program to a file that grants or denies acces
    13·1 answer
  • How do I download the Microsoft word on my Hp probook
    8·2 answers
  • 1) Why is angle of view important? What are some of the ways that you can do this?
    6·1 answer
  • Which one of the following statements is true regarding the fetch-execute cycle? Each step of the fetch-execute cycle is perform
    15·1 answer
  • A digital designer might do computer animations for video games,<br> OA<br> True<br> OB<br> False
    12·2 answers
  • What is the largest place value in a 12 bit binary number?
    10·1 answer
  • HELP AASAP BRAINLIEST JUST HELP
    13·1 answer
  • In what way , if any, can your social media presence affect your chances of getting a job in social media?
    8·1 answer
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    8·1 answer
  • You want to add a caption to a table. which tab contains this option?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!