Given f(N) = N(N-1)/2
This can be done by writing a computer program, with a function
for f(N) and then in the main, initialize N to 1, and then write a
loop to check f(N) < time, where time = 60 for (a), time = 3600
for (b) and time = 86400, and inside the loop increment N by 1
Once outside the loop, display the value of N-1
The pseudocode for the main function is given as below:
Get Value for time
N 1
while f(N) < time
N N + 1
Print N-1 with suitable title
So, the
program should have defined the function f(N) and also write the
main.
Given f(N) = N(N-1)/2 This can be done by writing a computer program, with a function for f(N) and then in the main, ini
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am