Computer Science, asked by DrStudy, 10 months ago

Write a program using 'for' loop to print the following output:
1
1.5
2
2.5
3
3.5
4
4.5
5
5.5

And the best will be marked as the brainliest answer.​

Answers

Answered by cherry385
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 .

Answered by ayanaslam2005
0

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