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

Angie reads 22 pages during a 30 minute study hall.At this rate how many pages would she read in 45 minutes
The spread of Hinduism into China was most likely the result of A)war between India and China. B)trading relationships. C)human migration. D)the concepts of Hi
explain why organisms need enzymes to survive?
What is an activity that can help you enhance the appearance of your computer’s desktop?
How was the tea act unfair to colonial merchants
Name three groups that clashed over territory and resources in South Africa
How does your knowledge of ecosystem help you understand the process of succession ?
The sentence "Like a boil that can never be cured as long as it is covered up but must be opened with all its pus-flowing ugliness to the natural medicines of a
why is a favorable balance of trade important?
During the electron transport chain which process leads to the production of large amounts of ATP