do u print this format '(((())))'. This brackets is based on
user input like 4 or 5 or 6,without using any loop's?
Answer / ashutosh tiwari
int r;
Void main()
{
scanf("%d",&r);
fun();
}
void fun()
{
static int t = r;
printf("(");
if(--t != 0)
fun();
printf(")");
}
OR
void main()
{
int r,i;
scanf("%d",&r);
i=r;
repeat1:
if(i != 0)
{
printf("(");
i--;
goto repeat1;
}
i=r;
repeat2:
if(i != 0)
{
printf(")");
i--;
goto repeat2;
}
}
| Is This Answer Correct ? | 11 Yes | 2 No |
Why & is used in c?
Write a program of prime number using recursion.
write a program to display all prime numbers
how can i print "hello"
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Combinations of fibanocci prime series
write a program that finds the factorial of a number using recursion?
what is available in C language but not in C++?
10 Answers CTS, TCS,
What's a "sequence point"?
What is the size of array float a(10)?
what are two kinds of java
What is new line escape sequence?