Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c# programming a answer as quick ass possible would be appreciated. svenska engelska +7 [1] Suppose you have a program where there is a variable

image text in transcribedc# programming a answer as quick ass possible would be appreciated.
svenska engelska +7 [1] Suppose you have a program where there is a variable float max; which contains a positive value. You should now write two loops as below. (In both cases, the code must work regardless which value you have assigned to max, as long as it is greater than zero.) a) Write a for-loop that in each round halves the value of max. Your loop should end either when run 1000 times, or when the value of max is less than 0.001 (depending on which happens first). In your solution, you should show the use of break to achieve this. b) Write a do-loop to calculate the sum of 0+ 1 + 2 + ... + n where the value n max. Submit your answers in file Fortstt verstta

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions