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 #error and use of it?

900


Why are algorithms important in c program?

815


Is it better to use a macro or a function?

877


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

873


What is indirection?

833


What is the difference between local variable and global variable in c?

900


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

905


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2130


How to establish connection with oracle database software from c language?

1904


Should I learn data structures in c or python?

748


Why void is used in c?

764


Not all reserved words are written in lowercase. TRUE or FALSE?

973


What the advantages of using Unions?

895


What is the g value paradox?

840


When a c file is executed there are many files that are automatically opened what are they files?

804