can you answer these codes problems?
can you answer each one of them in separate paper and in details?
Note: It is recommended that you save your response as you complete each question.
Questions
Jestions saved
Question 3 (10 points)
a
Write a loop to compute the sum of the following values:
1 1/3 1/6 1/9 1/12 … 1/294 1/297 1/300
Display the result in a label called sumOuput as a number rounded to five decimal
places.
2:
Additionally, display your name in the title bar of the current form.
U
1
B
V
Paragraph
age 3:
douuble sum = 0;
3
a
int count = 0;
A « EQh
Page 4:
4
a
Page 3 of 5
Save
Page 5:
Next Page
Previous Page
Page 2 Saved
Chp
Baca
eeeeee
Next Page
Previous Page
Questions
uestions saved
Note: It is recommended that you save your response as you complete each question.
Question 4 (10 points)
ə
The population of your hometown in 2016 is N thousand people and is growing at
the rate of 1.7% per year. Write a segment of code to determine how many years will
it take for the population to triple. Display result in a Message Box.
2:
Use variable names and their values (N) that would apply to your own hometown.
.
.
1
U
B
v
Paragraph
O
age 3:
double populationTown=7000
3
a
double populationtowntriple=210000
A < Eh
Page 4:
4
a
Page 4 of 5
Save
Page 5:
Next Page
Previous Page
Page 3 Saved
hp
2.
F
れ
hop
FO
FB
F7
Back
F6
F6
F4
0:35:00
estions
estions saved
Question 5 (10 points)
a
What is the output of the following segment of code, and where it will be displayed?
Assume "n" is the number of your computer (look at the right bottom corner of the
screen or behind the screen).
listMathEquation.Items.Clear();
listMathEquation.Items.Add("My computer number is: " + n);
:
for (int j = 5; j < 12;j += 5)
{
listMathEquation.Items.Add( (n + j*3)+"="+n + "+" + "3" + ]);
}
В І
U
e 3:
v
Paragraph
My computer number is 35
age 4:
35-3*1 = (35-31)
A) « Eg h
4
Dosas
Page 5:
Save
Page 4 Saved
Damian
ho
aree
ES
F7
Back
FG
F6
Jestions
Note: It is recommended that you save your response as you complete each question.
estions saved
Question 2 (10 points)
a
A copying center charges 10 cents per copy for the first 20 copies and 8 cents per
copy for each additional copy.
Assume the total number of copies is entered in a textbox named
copies Numberinput.
:
Write a segment of code to compute the total cost and output it to a label called
costTotalOuput. Display the result as a dollar amount with accuracy to cents.
Additionally, display your name and this semester in the title bar of the current form
(use "this" keyword).
e 3:
I
U
V
B
Paragraph
3
age 4:
int cost;
4
int count = 0;
8
A
« Ea
Page 5:
Page 1 Saved
Save
שת
42
Chp
FO
FB
F7
Becker
FB
F5
list)
for (int j = 5; j < 12; j += 5)
{
listMathEquation.Items.Add( (n + j*3) + " = " +
}
V
B I
Paragraph
My computer number is 35
35-3*1 = (35-3*1)
Save
Saved
Drawiane De