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
So has anyone opened the link/file those people are giving out as answers? Like what are they, viruses, answers, nothing??? Some
SIZIF [17.4K]

Answer:

I see them too! I think their viruses. I tried to answer a few questions and they are on 90% of people questions. would not click on

3 0
3 years ago
Read 2 more answers
What type of devices are a keyboard and a mouse?
natulia [17]
They are technology devices
5 0
3 years ago
Write a C++ program that reads from the standard input and counts the number of times each word is seen. A word is a number of n
Rufina [12.5K]

Answer:

#include <stdio.h>

#include <string.h>

#include <ctype.h>

 

struct detail

{

   char word[20];

   int freq;

};

 

int update(struct detail [], const char [], int);

 

int main()

{

   struct detail s[10];

   char string[100], unit[20], c;

   int i = 0, freq = 0, j = 0, count = 0, num = 0;

 

   for (i = 0; i < 10; i++)

   {

      s[i].freq = 0;

   }

   printf("Enter string: ");

   i = 0;

   do

   {

       fflush(stdin);

       c = getchar();

       string[i++] = c;

 

   } while (c != '\n');

   string[i - 1] = '\0';

   printf("The string entered is: %s\n", string);

   for (i = 0; i < strlen(string); i++)

   {

       while (i < strlen(string) && string[i] != ' ' && isalnum(string[i]))

       {

           unit[j++] = string[i++];

       }

       if (j != 0)

       {

           unit[j] = '\0';

           count = update(s, unit, count);

           j = 0;

       }

   }

 

   printf("*****************\nWord\tFrequency\n*****************\n");

   for (i = 0; i < count; i++)

   {

       printf("%s\t   %d\n", s[i].word, s[i].freq);

       if (s[i].freq > 1)

       {

           num++;

       }

   }

   printf("The number of repeated words are %d.\n", num);

 

   return 0;

}

 

int update(struct detail s[], const char unit[], int count)

{

   int i;

 

   for (i = 0; i < count; i++)

   {

       if (strcmp(s[i].word, unit) == 0)

       {

           s[i].freq++;

 

           return count;

       }

   }

   /*If control reaches here, it means no match found in struct*/

   strcpy(s[count].word, unit);

   s[count].freq++;

 

   /*count represents the number of fields updated in array s*/

   return (count + 1);

}

4 0
4 years ago
What is an examlple of cyberbullying
Alex73 [517]

Answer:

sending rude text messages

Explanation:

3 0
4 years ago
"if you add text, delete text, or modify text on a page, word recalculates the location of automatic page breaks and adjusts the
Flura [38]

Answer:

The answer to this question is option (a).

Explanation:

In the computer, all the data will store in a file that can be text file, image file, etc. All the file store data into (binary language that is (0,1)). In Microsoft Word or any other word software, we add, delete or modify any text that stores in file.  The software adjusts text location, memory, and breaks the pages automatically.

 So the correct answer to this question is option (a).  

8 0
3 years ago
Read 2 more answers
Other questions:
  • A*+(B+c|3) how do you figure out the coding for this
    14·1 answer
  • 6-3.1 After visiting a large number of Web sites to complete your research for a lengthy research paper, your computer begins to
    14·2 answers
  • An organization’s SOC analyst, through examination of the company’s SIEM, discovers what she believes is Chinese-state sponsored
    12·1 answer
  • Why are computers assigned IP addresses
    15·1 answer
  • Guys help—How do you start a conversation with someone on brainly if that is a thing?
    6·1 answer
  • Write code that prints: Ready! numVal ... 2 1 Go! Your code should contain a for loop. Print a newline after each number and aft
    14·1 answer
  • Jacob has a text file open, and he is typing on the keyboard. What is the best description of how the
    8·1 answer
  • The border to the right of a column is called the ____.
    12·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
  • Which three options below describe typographic hierarchy?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!