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 |
Last Saturday Milan went for the late night show and came late. In the morning family members asked him which movie did he see. He gave different answers to everyone. ? He told to his father that he had gone to see MONEY. ? According to his mom, he saw either JOHNY or BABLU. ? His elder brother came to know that he saw BHABI. ? To his sister, he told ROBOT. ? And his grandpa heard that he saw BUNNY. Thus, Milan gave six movie names, all five letter words. But he saw some other movie with five letter word. Moreover, each of the six movie names mentioned above has exactly two letters common with the movie he saw. (with the same positions) Can you tell which movie did Milan see?
If it is given that: 25 - 2 = 3 100 x 2 = 20 36 / 3 = 2 What is 144 - 3 = ?
All types of puzzles asked in SBI exam.
0 Answers State Bank Of India SBI,
Three boxes labeled as red, blue and mixed.These labels are incorrect.one box contains red balls and another box contains blue balls and remaining one box contains both red and blue balls. Pickup one ball from any box(u should pickup ball only once) and name the correct labels.
7 Answers 3D PLM, Exilant, IBM, NDS, Oracle, SofTech, Sports Keeda, The Advisory Board Company, Zycus Infotech,
In the following multiplication, certain digits have been replaced with asterisks (*). Replace all the asterisks such that the problem holds the result.
What are the chances that at least two out of a group of fifty people share the same birthday?
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?
SlowRun Express runs between Bangalore and Mumbai, For the up as well as the down journey, the train leaves the starting station at 10:00 PM everyday and reaches the destination at 11:30 PM after three days. Mr. Haani once travelled by SlowRun Express from Mumbai to Bangalore. How many SlowRun Express did he cross during his journey?
Six cabins numbered 1-6 consecutively, are arranged in a row and are separated by thin dividers. These cabins must be assigned to six staff members based on following facts. 1. Miss Shalaka's work requires her to speak on the phone frequently throughout the day. 2. Miss Shudha prefers cabin number 5 as 5 is her lucky number. 3. Mr. Shaan and Mr. Sharma often talk to each other during their work and prefers to have adjacent cabins. 4. Mr. Sinha, Mr. Shaan and Mr. Solanki all smoke. Miss Shudha is allergic to smoke and must have non-smokers adjacent to her. 5. Mr. Solanki needs silence during work. Can you tell the cabin numbers of each of them?
Dr. DoLittle always goes walking to the clinic and takes the same time while going and while coming back. One day he noticed something. When he left the home, the hour hand and the minute hand were exactly opposite to each other and when he reached the clinic, they were together. Similarly, when he left the clinic, the hour hand and the minute hand were together and when he reached the home, they were exactly opposite to each other. How much time does Dr. DoLittle take to reach home from the clinic? Give the minimal possible answer.
Once a week a wagon driver leaves his hut and drives his wagon to the river dock to pick up supplies for his town. At 4:05 PM, one-fifth of the way to the dock, he passes the Temple. At 4:15 PM, one-third of the way, he passes the Preetam-Da-Dhabaa. At what time does he reached the dock?
Everyday in his business a merchant had to weigh amounts from 1 kg to 121 kgs, to the nearest kg. What are the minimum number of different weights required and how heavy should they be?