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
Read first a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata to writ
Stells [14]

Answer:

/*

* Program to write data to text file.

*/

#include<iostream>

#include<fstream>

#include<string.h>

using  namespace std;

int main()

{

//Variable to name and age of a person.

string name;

int age;

cout<<"Enter your name"<<endl;

cin>>name;

cout<<"Enter your age"<<endl;

cin>>age;

     //Creating object of ofstream.

   ofstream file;

   file.open ("outdata.txt");

   //Writing data to file named outdata.txt

   file<<name<<" "<<age;

   file.close();

 

}

Output:

Enter your name

John

Enter your age

25

Content of Output.txt:

John 25

Explanation:

To write data to a file  ofstream object is used. An ofstream object file is created first and then using this object a file named "outdata.txt" is created.

Finally using shift operator (<<), by means  of operator overloading, name and age of  person is transferred to file outdata.txt.

8 0
3 years ago
Database queries is an example of
storchak [24]

Answer:

A query in a database is a request for information stored within a database management system (DBMS), which is the software program that maintains data.

SQL(Structured Query Language ( is a standard language for storing, manipulating, and retrieving data in database.

Five types of SQL queries are:

1) Data Definition Language (DDL).

used to define and modify the structure of a database.

2) Data Manipulation Language (DML).

used to manipulate (change) the data in the database.

3) Data Control Language(DCL).

used for access control and permission management for users in the database.

4) Transaction Control Language(TCL).

used for maintaining consistency of the database and for the management of transactions made by the DML commands.

5) Data Query Language (DQL).

used for performing queries on the data within schema objects.

8 0
2 years ago
Kelvin owns a small trading firm. Recently, he suspected that some of his employees were using fraudulent activities for their p
RideAnS [48]

Answer:

D. spyware

Explanation:

Well it kind of explains itself. He wants to "spy" on their activities.

7 0
3 years ago
Read 2 more answers
Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
Lynna [10]

Answer:

def print_popcorn_time(bag_ounces):

 if bag_ounces<3:

   print("Too Small")

 elif bag_ounces>10:

   print("Too Large")

 else:

   bag_ounces = bag_ounces*6

   print("%s Seconds\n" % bag_ounces)    

Explanation:

  • Using Python Programming Language
  • The function is defined to accept an int parameter
  • Within the function body, if...elif and else statements are used to print the desired output
  • note the use of the %s placeholder (formated output) and \n for a new line in the final print statement
4 0
3 years ago
Can a percent be used in a filename?
alina1380 [7]
Hey There!

A percent can be used in a filename.
4 0
3 years ago
Other questions:
  • Explique si en la pc que se usa para hacer las tareas escolares se puede ver un video juego de los llamados “pesados”
    13·1 answer
  • The arrows in this question indicated the determination of two attributes. For example, the arrow that goes ProductID to Product
    11·1 answer
  • Question # 6
    11·2 answers
  • What best describes the ability to increase the access to server resources and provide fail-safe services by linking two or more
    13·1 answer
  • Which role will grant a delegate read-only access to a particular workspace within a user’s Outlook mailbox?
    15·2 answers
  • Can you please help me
    9·1 answer
  • The use of a concept or product from one technology to solve a problem in an unrelated one
    11·1 answer
  • 1.erros can easily be ____ 2.work is done in an ____ no mess environment 3.colors do not _____ and brushes are never ______ 4.st
    14·1 answer
  • What type of malware is best known for carrying other malware as a payload?
    8·1 answer
  • What are three ways of verifying legitimate right of access to a computer system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!