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 |
Find out all possible groups of three different numbers that add up to 13 and arrange them according to given condition. If one number is 9, it must go with 1 and 3. If one number is 8, it must go with either 1 and 4 or 2 and 3. If one number is 7, it must go with either 1 and 5 or 2 and 4. If one number is 6, it must go with either 2 and 5 or 3 and 4.
(9^-2)*81*(5/6)
How would you cut a cake in 8 pieces with only three cuts.
14 Answers CTS, eClerx, Exilant, Google, Infosys,
how do i improve my logical questions. is there any website?
In rail road there are some stations. Each station should have tickets to all other stations.If they add some new stations they need 46 more tickets.How many stations are there before and after adding the stations?
how many coins do i have in my pocket
Please convert 13 LETTERS- "FTOGUNIROIYWA" INTO THREE WORDS RELATED TO LOVE.?
A farmer needs 8 gallons of water. He has only three unmared buckets, two 6 gallon and one 11 gallon bucket. How can he collect 8 gallons of water using three unmarked buckets? Provide solution with minimal water wastage.
find odd one out among these 25,36,49,64,81
An anthropologist discovers an isolated tribe whose written alphabet contains only six letters (call the letters A, B, C, D, E and F). The tribe has a taboo against using the same letter twice in the same word. It's never done. If each different sequence of letters constitues a different word in the language, what is the maximum number of six-letter words that the language can employ?
Ship is 180 miles away from shore. At that time a plane started from shore to pass some information to the ship with 10 times velocity of ship's velocity. At what distance from shore they will meat?
There are numbers from 1 to n, which are inverted such that it results in numbers from n to 1. If only two consecutive numbers are stampled at a time and are inverted, how many moves are required?
7 Answers Persistent, Soliton, Soliton Technologies,