code Java Tech

Java Basics Exercises | Software Testing is an Art!

  1. Write a program that prints the sum of the first ten constructive integers
  2. Double your savings
  3. The higher deal automotive
  4. Drive a automotive or take the practice
  5. Write the code to attract a tower of blocks
  6. Draw a flower

Write a program that prints the sum of the primary ten constructive integers, 1 + 2 + … + 10.

You set $10,000 into a checking account that earns 5% interest per yr. What number of years does it take to double the unique?

The choice of shopping for two automobiles – one is extra gasoline environment friendly but in addition costlier. You understand the worth and gasoline effectivity for both automobiles, and plan to maintain the automotive for 10 years. Assume a worth $four per gallon of fuel and usage of 15,000 miles per yr. Automotive #1: $25,000, 50 miles/gallon. Automotive #2: $20,000, 30 miles/gallon. Which automotive is the better deal?

The one-way distance from residence to work is 20 miles. Gasoline efficiency in your automotive – 30 miles per gallon. Value of fuel – $four / gallon. Ticket worth – $10. Automotive maintenance – 5 cents per mile. Which commute is cheaper?

Write the code to draw a tower of blocks that looks precisely like at
Each block has a width of 40 and a peak of 30. The higher left-hand corner of the bottom row is at (20, 70)

Write the code to draw two flowers that look precisely like at
There are four pink petals and a yellow middle. Every petal and the middle is a circle with a diameter of 20. A circle is an ellipse through which the width and peak are both equal to the diameter of the circle. The pink circles contact the yellow one.
The stem is inexperienced and is on the middle line of the flower. Its length is 3 occasions the diameter.