Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / harsha
#include<stdio.h>
int i=0;
void main()
{
if(i==0)
clrscr();
if(i<100) {
printf("%d \t",++i);
main(); }
else {
getch();
exit(0); }
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Which is better oop or procedural?
Explain the difference between call by value and call by reference in c language?
What is local and global variable in c?
What do you mean by Recursion Function?
What are the 5 data types?
How do you declare a variable that will hold string values?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Do you know what are the properties of union in c?
simple program of graphics and their output display
will u please send me the placement papers to my mail???????????????????
What are the advantages of external class?
What is meant by preprocessor in c?
What are the 5 types of inheritance in c ++?