Without using any loops print {{{}}} (u cant use
goto,for,while etc..).
Answers were Sorted based on User's Feedback
Answer / ankita shukla
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("{{{}}}");
getch();
}
| Is This Answer Correct ? | 24 Yes | 2 No |
Answer / jaydeep
#include<iostream>
using namespace std;
class CSomeClass
{
public:
CSomeClass()
{
cout<<"{";
}
~CSomeClass()
{
cout<<"}";
}
};
int main()
{
CSomeClass SomeObjects[3];
return 0;
}
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / siddarth pillai
public class TestRec
{
public static void main(String args[])
{
String Shape = " ";
int num = 3;
int count = 0;
Display(num,count,Shape);
}
public static void Display(int num,int count,String Shape)
{
if(count < num)
{
Shape = "{"+Shape+"}";
count++;
Display(num,count,Shape);
}
else
System.out.println(Shape);
}
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / jeevan
Use recursive function for this
in example example user has entered 3
(Code is written in VB)
Num = 3
Itt = 0
ListPR = ""
Function PrintPra(ListPR as String,Itt as integer)
if Itt < 3 then
ListPR = "{" & ListPR "}"
itt = itt +1
'Call the Function again
PrintPra(ListPR,Itt)
else
Print ListPR
end
End if
End function
| Is This Answer Correct ? | 6 Yes | 3 No |
Raj has a jewel chest containing Rings, Pins and Ear-rings. The chest contains 26 pieces. Raj has 2 1/2 times as many rings as pins, and the number of pairs of earrings is 4 less than the number of rings. How many earrings does Raj have?
In a locked empty room from inside a man hanged himself to a fan above 10 feet and there is nothing in the room on which he could have stand and hung up but there is some water on the floor can anybody give the answee
If you started a business in which you earned Rs.1 on the first day, Rs.3 on the second day, Rs.5 on the third day, Rs.7 on the fourth day, & so on. How much would you have earned with this business after 50 years (assuming there are exactly 365 days in every year)?
(9^-2)*81*(5/6)
sir i need catholic syrian bank previous question papers fully. it will be helpful for me to greater extend .please do the needful to me.
In Mr. Mehta's family, there are one grandfather, one grandmother, two fathers, two mothers, one father-in-law, one mother-in-law, four children, three grandchildren, one brother, two sisters, two sons, two daughters and one daughter-in-law. How many members are there in Mr. Mehta's family? Give minimal possible answer.
a frog starts climbing 20 feet wall. each day he climbs 3 feet , he slips back 2 feet. how many day does the frog take to reach the top?
A 3 digit number is such that it's unit digit is equal to the product of the other two digits which are prime. Also, the difference between it's reverse and itself is 396. What is the sum of the three digits?
My friend collects antique stamps. She purchased two, but found that she needed to raise money urgently. So she sold them for Rs. 8000 each. On one she made 20% and on the other she lost 20%. How much did she gain or lose in the entire transaction?
Reshma is standing in front of her room.Ramu is coming from north towdars her and he can see his shadow falling on his right.In which direction she is standing?
8. Given a collection of points P in the plane , a 1-set is a point in P that can be separated from the rest by a line, .i.e the point lies on one side of the line while the others lie on the other side. The number of 1-sets of P is denoted by n1(P). The minimum value of n1(P) over all configurations P of 5 points in the plane in general position (.i.e no three points in P lie on a line) is a) 3 b) 5 c) 2
how to draw a rectangle using 3 lines?
9 Answers CMC, ICAD, MAHINDRA, TATA, TCS,