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 is sizeof array in c?
Write a program to check palindrome number in c programming?
How do you use a 'Local Block'?
How can I find out how much free space is available on disk?
Is it cc or c in a letter?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
Write a program to generate random numbers in c?
Explain what are the standard predefined macros?
How do you initialize pointer variables?
Wt are the Buses in C Language
What is wrong with this initialization?
What does typeof return in c?
What is a loop?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
How can you increase the size of a statically allocated array?