program in c to print 1 to 100 without using loop
Answer Posted / gadigebhasker
void otoh(int,int);
void main()
{
int x,y;
printf("enter initial value x & y final value\n");
scanf("%d%d",&x,&y);
printf("0 to 100 number\n");
otoh(x,y);
getch();
}
void otoh(int a,int i)
{
if(a<=i)
{
printf("%d\t",a++);
otoh(a,i);
}
else
printf("END");
}
| Is This Answer Correct ? | 27 Yes | 4 No |
Post New Answer View All Answers
What is the best organizational structure?
how to construct a simulator keeping the logical boolean gates in c
Explain what’s a signal? Explain what do I use signals for?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Explain how to reverse singly link list.
What functions are used in dynamic memory allocation in c?
What is structure and union in c?
Write a program to reverse a string.
What are the keywords in c?
Can we change the value of constant variable in c?
Differentiate between functions getch() and getche().
Why we write conio h in c?
What are void pointers in c?
What are external variables in c?
What is wild pointer in c with example?