answersLogoWhite

0


Best Answer

public class PrintValues {

public static void main(String[] args) {

for (int i = 1; i <=20; i++) {

System.out.println("Value is: " + i);

int sq = i * i;

System.out.println(i + " Squared is: " + sq);

}

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program that prints every integer value from 1 to 20 along with its squared in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What you the difference between a program and an app?

Its Application, not app, app just sounds so..... I dont know... Anyway, a program could just be a command line utility or any executable code basically. An Application is generally a complete bundle, with a GUI, etc. Every application has an executable program somewhere inside though, along with the images, sounds, etc.


How do you link a programming with other programming languages?

This is done via a call sequence. The syntax is different between languages but the process is about the same. The calling program issues a call to the called program and passes data items known as arguments. These arguments are used to instruct the called program on what actually to do. After the called program has completed its function it passes these arguments back to the calling program along with a return code to inform the calling program everything was ok, or not ok.


How old is the Easytrieve programming language?

I conceived the program in 1966 and worked on it as a spare time project. We contracted with them to market our program and they did extremely well. Sales increased exponentially and in December 1979, Pansophic purchased Easytrieve along with a 5-year maintenance agreement. A patent application for Easytrieve was filed in 1971 and was granted 10 years later6


Write a c program to add all numbers between 100 and 200 which contain the digit 5 along with steps?

#include int main(void){int a;for(a=100;a


How can you make a splash screen in c or c plus plus?

Many people use a modified version of the program's About dialogue window as a splash screen, but you can also create a dedicated splash screen window that contains an image of the company logo along with some program information. The choice is yours but ultimately a splash screen is nothing more than a window that is shown while a program loads in the background. When the program has loaded, the splash screen is closed automatically. The simplest method of displaying your splash screen is to use a program loader function. Typically this will be your program's main function or a function called from your main function. The program loader first loads and displays the splash screen, then loads the rest of your program in the background before closing the splash screen window and finally showing the main window. Some splash screens display progress information during the load sequence, thus your program loader should send messages to the splash screen and give time to the system to allow messages to be processed. This will increase the time it takes to load your program, but if the load process is lengthy to begin with, it is better to give some indication of the progress.

Related questions

What prints along with the text of an outline when printing in expanded view?

slide icon and slide number


Why is this program so?

this program is for asking question then u have to wait along time for your answer sometimes XD


What is telly selling?

A TV program showing goods that can be purchased by ringing up the company along side the program.


How do you calculate velocity final with distance and acceleration?

aSsuming constant acceleration, and movement along a line, use the formula: vf2 = vi2 + (1/2)at2 (final speed squared equals initial speed squared plus one-half times acceleration times time squared).


How does algorithm and c plus plus program get along?

They are bosom-friends.


What has the author David Acton written?

David Acton has written: 'Along Ipswich River: The color woodcuts of Arthur Wesley Dow' 'The Stamp of Impulse' 'A spectrum of innovation' -- subject(s): American Color prints, Color prints, American, Exhibitions, Worcester Art Museum '60 years of North American prints, 1947-2007' -- subject(s): American Prints, History, Boston Printmakers, Printmakers, Exhibitions 'Sylvia Wald' -- subject(s): Exhibitions, Abstract expressionism


What is a mixed number with examples?

A mixed number consists of a integer along with a fractional part. For example 23/4 or two and three quarters.


Does Bigfoot caring for it's young?

There been prints of bigfoot with its young walking along and tracks showed that the mother kept the young one close by. Reports say the same.


Is the auburn football program being investigated?

yes they are, along with asst coach trooper


What is The Drawing Center's Viewing Program?

The Drawing Center's Viewing Program offers young emerging artists the opportunity to have their work displayed in the gallery along with other famous work. This program was established in 1977.


What is the total surface area of a cube with the edge of 8cm?

A cube has be definition has slides all of the same length, which in turn means all six faces are squares, in this case 8cm along each side. Once side would have an area of 8cm x 8cm which is 64 cm squared but you have six of them 6 x 64 cm squared is 384 cm squared


How old do you have to be to participate in a police ride along program?

Fraser Woods wants to have sex with Breanna Wilabhy