25. It takes five minutes to pass a rumour from one
person to two other persons. The tree of rumour continues.
Find how many minutes does it take spread the rumour to 768
persons. ?
Answer Posted / pradeep
It requires 45 minutes:
Find the logic below:
int time;
for ( int i=0,SpreadRate=1,Ppl=0;Ppl<=768;i++)
{
Ppl = Ppl + SpreadRate;
time = 5 * i;
SpreadRate = SpreadRate * 2;
}
printf("time in min %d \r\n"),time);
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Which built-in library function can be used to match a patter from the string?
What is pre-emptive data structure and explain it with example?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Process by which one bit pattern in to another by bit wise operation is?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Write a program to print factorial of given number without using recursion?
What does node * mean?
What does %p mean c?
What is the main difference between calloc () and malloc ()?
How are pointers declared in c?
What is a stream in c programming?
Place the #include statement must be written in the program?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Lists the benefits of c programming language?