cpp program Raj's teacher Anu uses chalk to write on the board. When the chalk reduces to 1/squareroot(n) of its original size, she keeps the chalk aside as it gets too small. She joins all the small pieces of the chalk and makes another chalk of the same size and uses it. If she uses one chalk each day, in how many days will she use the given n number of chalks?
Answers
Answer:
Total days = n + sqrt(n)
Step-by-step explanation:
We are given that the teacher uses a chalk till it gets 1/squareroot(n) of its original size.
It means that if the teacher is given with n chalks then,
Let n = z^2
Then she will leave the chalk when it is 1/z of the lengh.
It is also given that teacher uses one chalk each day, means if she has z^2 chalks, this will require z^2 days. Additionally, she can join small pieces, so with z^2 chalks, he can put up another z^2 x 1/ z chalks, means he can get another z chalks and then total days would be
Total days = z^2 + z
Writing in terms of n
Read more on Brainly.in - https://brainly.in/question/16345233#readmore
Explanation:
hiii guys please follow me
Explanation:
include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main()
{
float n,root,count=0.00;
int val=1,days,ans;
cin>>n;
root=(1/sqrt(n));
cout<<setprecision(2);
for(int i=0;i<n;i++)
count=root+count;
days=int(count);
ans=n+days;
cout<<ans+1;
}