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 |
there r 100 people who buys juice if v take 500 random sample we find 75 people who buys juice then how many random sample they need 2 find remaining 25 buyers
what three specific job positions do you target from qatar airways group u.k?
3 blocks are chosen randomly on a chessboard. What is the probability that they are in the same diagonal?
Four prisoners escape from a prison. The prisoners, Mr. East, Mr. West, Mr. South, Mr. North head towards different directions after escaping. The following information of their escape was supplied: ? The escape routes were North Road, South Road, East Road and West Road ? None of the prisoners took the road which was their namesake ? Mr. East did not take the South Road ? Mr.West did not the South Road ? The West Road was not taken by Mr. East What road did each of the prisoners take to make their escape
X is a five letter word.X is a talent in u.if u remove 1st letter X is dead. if u remove 1st 2 letters x is sick.what is X?
In the General meeting of "Friends Club", Sameer said, "The repairs to the Club will come to a total of Rs 3120 and I propose that this amount should be met by the members, each paying an equal amount." The proposal was immediately agreed. However, four members of the Club chose to resign, leaving the remaining members to pay an extra Rs 26 each. How many members did the Club originally have?
If A * [(B + C)(D - E) - F(G*H) ] / J = 10 What number is ABCDEFGHJ where each letter is a digit?
there are 2 hour glass. one is 13min hour glass. another is 8min hour glass. u need to stop a button exactl aftr 18min..how do u calculate when 18min is passed?
Which figure should be placed in the empty triangle? 6 7 7 6 8 6 6 ? 2 2 5 3 4 2 5 3
There is puzzle with the word "CONSTANTINE" and exactly don't know the question if anybody knows the Q&A plz send it ahmed.basha.munna@gmail.com
A clock with the hours round the face in Roman block numbers, as illustrated in the sketch fell down and the dial broke into four parts....
wat will be the next number in the series.... 1,3,5,9,12,21,..