Computer Science, asked by ashmit9042, 7 months ago

Question 1.Read the following program segment and give the output.


int m = 10;

int n = 7;

while(m%n >=0)

{

System.out.println(m + “ “+n);

m++;

n+=2;

}


Question 2.The following segment is a part of some class. Read the segment and

re – write it by converting it to equivalent do – while loop


int i,m,j,r;

i = 1;

m = i;

for(j = 5; j >= 1 ; j--)

{

m*=i+j;

r=i++ * j;

System.out.println("m is = " + m);

}


Question 3.Convert the following do – while loop int for loop and also state the

output


int k = 1, d = 5,s=0;

do

{

d = d*5;

s = s+d;

System.out.println(“d = “+d);

++k;

}while(k<=4);

System.out.println(“s = “+s);


Question 4 Write a program to enter a number and display the largest digit

present in the number.


For example : Input - Enter integer 748632

Output – largest digit is – 8

Question 5 Write a program to input a number and print it digits in words.

For Example Input 3728

Output :- THREE

SEVEN

TWO

EIGHT​

Answers

Answered by ay5924125
1

ask one by one other wise no one is going to give the answer so long

hope you understand

Answered by 9985672792
1

Answer:

it may help you

make me as brainliest

Similar questions