Write a matlab program which prints numbers 1 to 10 using while loop.
Answers
Answered by
0
Answer:
public class main
{
public static void main()
{
int r = 1 ;
while(true)
{
System.out.println(r) ;
r = r + 1 ;
if(r == 10)
{
break ;
}
}
}
}
Explanation:
Easy
Similar questions