program in c to print 1 to 100 without using loop

Answer Posted / ashu

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a;
clrscr();
printf("there are 1 to 100");
a=0;
if(a<100)
{
a++;
printf("%d\n",a);
}
else if(a>100)
{
goto end;
}
end: getch();
}

Is This Answer Correct ?    5 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a void * in c?

598


Do you know what are bitwise shift operators in c programming?

588


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

813


Why does notstrcat(string, "!");Work?

644


What is pointer and structure in c?

575






Explain pointer. What are function pointers in C?

629


write a program to create a sparse matrix using dynamic memory allocation.

4374


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4991


Write a program to generate random numbers in c?

665


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

612


What is %s and %d in c?

594


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

810


What is the process of writing the null pointer?

608


What language is lisp written in?

619


What is null pointer constant?

596