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
Black_prince [1.1K]
3 years ago
5

Input an int between 0 and 100 and print the numbers between it and 100, including the number itself and the number 100. If the

number is less than or equal to 0, or greater than or equal to 100 print "error". Print 20 numbers per line.
Language: Java
Computers and Technology
1 answer:
Murrr4er [49]3 years ago
6 0

import java.util.Scanner;

public class JavaApplication42 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       int count = 0;

       System.out.println("Enter an integer between 0 and 100");

       int num = scan.nextInt();

       if (num <= 0 || num >= 100){

           System.out.println("error");

       }

       else{

           while(num <= 100){

               if (count == 20){

                   System.out.println("");

                   count = 0;

               }

               else{

                   System.out.print(num+" ");

                   count++;

                   num++;

               }

           }

       }

   }

   

}

I hope this helps!

You might be interested in
Which type of film would typically require the least amount of input from a screenwriter?
denpristay [2]

Answer:

comedy

Explanation:

thats for the writers ig

8 0
3 years ago
Please answer the following essay question:
MArishka [77]
Advertising is a paid promotion that uses strategic planning to target a certain audience. The seven functions of marketing is promotion, selling, product management, marketing information management, pricing, financing, and distribution. Usually you see common advertising such as digital ads, billboards, newspapers, flyers, and more. Advertising can spread awareness, popularize a brand, increase customer demand, and company profits. Advertising is necessary for most- if not all- companies including media outlets, the television industry, search engine companies, and social media websites.
8 0
3 years ago
What term refers to mathematical equations used in Excel to perform calculations?
vovikov84 [41]

Formulas is the BEST answer to your question.

4 0
2 years ago
Create a 4x5 matrix with ones everywhere and zeros on the last row.
Stells [14]

Answer:

#include <iostream>

using namespace std;

int main() {

   int a[4][5];//declaring a matrix of 4 rows and 5 columns.

   for(int i=0;i<4;i++)

   {

       for(int j=0;j<5;j++)

       {

           if(i==3)//initializing last row as 0.

           {

               a[i][j]=0;

           }

           else//initializing last row as 1.

           {

               a[i][j]=1;

           }

       }

   }

   for(int i=0;i<4;i++)

   {

       for(int j=0;j<5;j++)

       cout<<a[i][j]<<" ";//printing the matrix.

       cout<<endl;

   }

return 0;

}

Output:-

1 1 1 1 1  

1 1 1 1 1  

1 1 1 1 1  

0 0 0 0 0

Explanation:

I have created a matrix of size 4 rows and 5 columns.I have used for loops to fill the array.To fill the last row with 0 i have used if statement.else we are filling it with 1.

7 0
3 years ago
Is Naab a system of an accounting system? A factory operations system? or both? explain your answer
KonstantinChe [14]

Answer:

accounting system

Explanation:

The most common response variable modeled for cropping systems is yield, whether of grain, tuber, or forage biomass yield. This yield is harvested at a single point in time for determinate annual crops, while indeterminate crops and grasslands may be harvested multiple times. Although statistical models may be useful for predicting these biological yields in response to some combination of weather conditions, nutrient levels, irrigation amounts, etc. (e.g., Schlenker and Lobell, 2010, Lobell et al., 2011), they do not predict responses to nonlinearities and threshold effects outside the range of conditions in data used to develop them.

In contrast, dynamic cropping and grassland system models may simulate these biological yields and other responses important to analysts, such as crop water use, nitrogen uptake, nitrate leaching, soil erosion, soil carbon, greenhouse gas emissions, and residual soil nutrients. Dynamic models can also be used to estimate responses in places and for time periods and conditions for which there are no prior experiments. They can be used to simulate experiments and estimate responses that allow users to evaluate economic and environmental tradeoffs among alternative systems. Simulation experiments can predict responses to various climate and soil conditions, genetics, and management factors that are represented in the model. “Hybrid” agricultural system models that combine dynamic crop simulations with appropriate economic models can simulate policy-relevant “treatment effects” in an experimental design of climate impact and adaptation (Antle and Stockle, 2015).

5 0
2 years ago
Other questions:
  • To use files in a c++ program you must include the ________ header file.
    15·1 answer
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • Energy is defined as stored energy
    13·2 answers
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • ListenListen with ReadSpeakerAn administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on
    9·1 answer
  • Help me I'm so confused by this question
    7·1 answer
  • How do I add decimals in python?
    6·1 answer
  • Which type of document should Omar print?
    5·2 answers
  • Consider the following correct implementation of the selection sort algorithm.
    5·1 answer
  • Can somebody please help me with these few questions?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!