tharunikand7470
tharunikand7470 tharunikand7470
  • 19-03-2022
  • Computers and Technology
contestada

.Write a Basic program to display first 10 natural numbers
(using IF… THEN ..ELSE (or) FOR..LOOP)​

Respuesta :

aniilsah555
aniilsah555 aniilsah555
  • 19-03-2022

Explanation:

CLS

x=1

For I = 1 to 10

Print x;

x = x+1

Next I

End

Answer Link
rishiydv999
rishiydv999 rishiydv999
  • 19-03-2022

Answer:

Using for loop:

int i=0;

for(i=1;i<=10;i++)

{

printf(“%d”,i);

}

Using while loop:

int i=1;

while(i<=10)

{

printf(“%d”,i);

i++;

}

Using do while loop:

int i=1;

do

{

printf(“%d”,i);

i++;

}while(i<=10);

Answer Link

Otras preguntas

what is the approximate diameter of a sphere with a volume 34 cm the third power?​
SOMEONE HELP ME PLEASE !! What were the three main objectives or goals of the New Deal programs?
PLEASE help I am dying if you don't help me, I will give you brainliest and five stars, and even friend request you.
Hey! Can someone help me?
What does GDP stand for in economic terms? A. Gross Domestic Product B. General Domestic Product C. Government Domestic Product
if rose and Carl share a 18 ounce bucket of clay. by the end of the week rose has used 1/6 of the Bucket and carl used 2/3 of the bucket How many ounces are lef
What’s the answer??????
PLEASE HELP!!!!!!! WILL MARK BRAINLIEST!!!!!!!! PUT THE FOLLOWING IN ORDER FROM THE FIRST EVENT THAT HAPPENED TO THE LAST!!! TYSM! ____ China Enter the war ____
What are the angles of A,B,C and optional E,D?
Find the quotient. 4^r ÷ 4^s