Write a program to produce the following output:
1
2
3
4
5
6
7
8
9
10

Answer Posted / sagarraje nimbalkar

// using If else

#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
while(i<=10)
{
printf("\n%d",i);
i++;
}
}

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c language still used?

536


What does p mean in physics?

581


Explain what is the difference between a string and an array?

634


What is the difference between a free-standing and a hosted environment?

640


How important is structure in life?

590






What is void pointers in c?

586


What is storage class?

654


What are loops in c?

547


how to execute a program using if else condition and the output should enter number and the number is odd only...

1654


What are qualifiers?

615


Do you know the use of 'auto' keyword?

656


What is a rvalue?

747


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

718


What are two dimensional arrays alternatively called as?

657


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2220