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

If you are good at activities that require agility, what are you able to do well? 1.maintain your heart rate in the upper ranges 2.quickly change the direction
PLEASE HELP ME NOW!!! I WILL MARK U AS BRAINLIEST
Please helppppp I neeed to pass this class
umm... I got this question from my friend !How would you put an elephant in your fridge ?​
3 reasons why Columbus made voyages to the West Indies ​
can anyone please help
they _____ a book two years ago. (published) change into simple past​
Which of the following is a government retirement program that offers a tax incentive? A. Roth IRA B. Opt- out program C. A 529 plan D. Contribution matching
Ellie has an old chest of drawers that she wants to refurbish to match her coastal-style bedroom. What would be the BEST thing for Ellie to do to make it fit wi
A diprotic acid (H2X) titrated with a solution of NaOH for 25 ml of the acid 87.42 ml of a 1.95 M solution of NaOH was required to reach the equivalent point, t