Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Yes Bindu, You are right and thanks for correcting me.

and the right answer is 35 minutes.
Please find the logic and the program below:


int ppl , time , i , sum = 0;

printf("Enter the number of ppl u want to spread \r\n");
scanf("%d",&ppl);

while(sum<ppl)
{
sum = pow(3,i);
time = 5 * i;
i++;
}
printf("time in min required is %d \r\n",time);

[
out put:
Enter the number of ppl u want to spread
768
time in min required is 35
]
==================
For your refernce :
1->2 [ total 3 ppl ] took 5 min;
3 -> 6 [ total 9 ppl ] took 10 min
9 ->18 [ total 27 ppl ] took 15 min ..
27 -> 54 [ total 81 ppl ] took 20 min
81 -> 162 [ total 243 ppl ] took 25 min
243 -> 486 [ total 729 ppl ] took 30 min
729 -> 1458 [ total 2187 ppl ] took 35 min

overall it's power of 3
============================

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

1171


What is double pointer in c?

1045


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1266


hi any body pls give me company name interview conduct "c" language only

2289


What is a const pointer?

1132


What extern c means?

1009


What is a buffer in c?

1010


what are the 10 different models of writing an addition program in C language?

1897


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1089


Are there any problems with performing mathematical operations on different variable types?

1044


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2797


Explain what is a stream?

1097


What is an operator?

1081


What does the message "automatic aggregate intialization is an ansi feature" mean?

1193


What is n in c?

1064