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

What is spark map function?

571


Write a program of advanced Fibonacci series.

696


What are the features of c languages?

613


how should functions be apportioned among source files?

616


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

599






Are local variables initialized to zero by default in c?

539


Explain the use of keyword 'register' with respect to variables.

582


What type of function is main ()?

574


Where local variables are stored in c?

546


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

554


What is the difference between single charater constant and string constant?

615


Is there a built-in function in C that can be used for sorting data?

735


In which header file is the null macro defined?

838


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

911


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3167