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 volatile variable how do you declare it?
How do shell structures work?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
With the help of using classes, write a program to add two numbers.
What is calloc() function?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What is double pointer?
What is self-referential structure in c programming?
What is the meaning of && in c?
What is structure in c explain with example?
What is the process to create increment and decrement stamen in c?
How can I list all of the predefined identifiers?
how can I convert a string to a number?
What is the c language function prototype?
#include