Computer Science, asked by DrStudy, 10 months ago

write a program in Java to print the numbers in the following way:
1
1.5
2
2.5
3
3.5
4
4.5
5
5.5
Remember, you should not print it in the order of :
1.0
1.5
2.0
2.5 and so on.

Answers

Answered by arshadaseela555
1

Answer:

ndkdkenej dorne jeiejen

Answered by ayanaslam2005
1

Answer:

class Sush

{

public static void main ()

{

double x ;

for ( x=1;x<=5.5;x=x+0.5)

System.out.println(x);

}

}

Explanation:

it is a simple program , if have taken x in double because the sum is in decimal....

Hope this helps you....

Pls mark me brainliest....

Similar questions