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's a combination of 1+2+4+8+16+.... and each intervl
takes 5 minutes.
so use the below logic to find out the ryt answer
int time;
for ( int i=0,sum=0;sum<=768;i++)
{
sum = sum+(2*i);
time = 5*i;
}
printf("time in min %d \r\n"),time);
correct answer is 140 minutes [ nothng but 2 hours 20 min]
return TRUE;
| Is This Answer Correct ? | 4 Yes | 12 No |
Post New Answer View All Answers
What are the valid places to have keyword “break”?
Is a pointer a kind of array?
What are the different file extensions involved when programming in C?
What is a built-in function in C?
What is structure and union in c?
what is the significance of static storage class specifier?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Hai what is the different types of versions and their differences
how can use subset in c program and give more example
Write a program to swap two numbers without using the third variable?
What is c++ used for today?
When should the register modifier be used? Does it really help?
What does struct node * mean?
Explain threaded binary trees?
What is the difference between declaring a variable by constant keyword and #define ing that variable?