The program should be written in C# programming language!!! Only C# language accepted. Please write code relevant to the

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

The program should be written in C# programming language!!! Only C# language accepted. Please write code relevant to the

Post by answerhappygod »

The program should be written in C# programming
language!!!
Only C# language accepted.
Please write code relevant to the problem!!!
The Program Should Be Written In C Programming Language Only C Language Accepted Please Write Code Relevant To The 1
The Program Should Be Written In C Programming Language Only C Language Accepted Please Write Code Relevant To The 1 (70.4 KiB) Viewed 24 times
For a given amount of starting capital Kyou want to gain the maximum possible profit by buying and selling bonds over the course of Ryears. There are D types of bonds, and you may buy each of them as many times as you like. Each bond has a fixed purchase price and a bond yield that it pays at the end of each year. At the end of each year you may sell any bonds you held during the year and you may buy any other bonds instead. There are no transaction fees for trading. The input data is on standard input in the following form. The first line contains a single integer denoting the starting capital. This number K is at most 1,000,000. The second line contains an integer D, the number of bond types (at most 100). The third line consist! s of D pairs of positive integers - each pair is the price of a bond plus the bond's yield. These numbers are separated by a space character. The price of each bond is a multiple of 1000. Every bond's yield is at most 10%. The fourth line contains an integer between 1 and 40 indicating the number of years over which the money will be invested. The output of the program is a single integer - the maximum possible ending capital achievable by buying and selling the bonds over Ryears. Example: 10000 2 4000 400 3000 250 4 Output: 14050
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply