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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post by answerhappygod »

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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply