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
What is anagram in c?
How can you allocate arrays or structures bigger than 64K?
Why c is procedure oriented?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Explain what is meant by 'bit masking'?
What are keywords c?
What is 2 d array in c?
What does the file stdio.h contain?
What is a null pointer in c?
Can we increase size of array in c?
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
What are directives in c?
When should a far pointer be used?
What is the ANSI C Standard?
What is string concatenation in c?