Answer:
The C code is below.
Explanation:
#define amplitude 1
02 #define b 1
03 #define c 200
04 class Sinewave
05 {
06 protected:
07
08 double freq;
09 int y;
10
11 public:
12 Sinewave()
13 {
14
15 }
16 void generateSinewave()
17 {
18 COLORREF yellow = RGB(255,255,0);
19 COLORREF lightblue = RGB(173,216,230);
20
21 // make sure the names match
22 SetConsoleTitle(L"ConGraphics");
23 HWND hWnd = FindWindow(NULL, L"ConGraphics");
24 HDC hDC = GetDC(hWnd);
25
26 //for(int x = 0; x < freq; x++)
27 for(int x = 0;; x++)
28 {
29 // center at y = 200 pixels
30
31 y = amplitude*(int)(sin(x/100.0)*100 + 150);
32 SetPixel(hDC, x, y, lightblue);
33
34
35 }
36
37 }
38 };
A quick format<span> changes the file system while the </span>full format<span> also checks the </span>drive for bad sectors. <span>The scan for bad sectors is the reason why the Full </span>format<span> takes twice as long as the </span>Quick format<span>. If you choose the </span>Quick format<span> option, the </span>format<span> removes address files from the partition, but does not scan the disk for bad sectors.</span>
Answer:
So that the game will make money advertising that game
Explanation:
Answer:
I am writing the Python program:
lyrics = ["I wanna be your endgame", "I wanna be your first string",
"I wanna be your A-Team", "I wanna be your endgame, endgame"]
lines_of_sanity = 6
counter = 0
while counter <= lines_of_sanity+1:
for line in lyrics:
print(line)
counter = counter + 1
print("MAKE IT STOP")
Explanation:
- The lyrics is a list which has the following lines of song.
I wanna be your endgame
I wanna be your first string
I wanna be your A-Team
I wanna be your endgame, endgame
- The value of lines_of_sanity is 6.
- counter variable is initialized to 0.
- The while loop starts which keeps executing until the value of counter becomes greater than 6 which is the value of lines_of_sanity
- The for loop inside the while loop moves through each line of lyrics list and prints that line. The counter variable increments to 1 at each iteration.
- Lets see what the while and for loops print at each iteration:
1st iteration: counter = 0, following line is displayed:
- I wanna be your endgame
- Value of counter increments by 1.
- counter = 1
2nd iteration: counter = 1, following line is displayed:
- I wanna be your first string
- Value of counter increments by 1.
- counter = 2
3rd iteration: counter = 2, following line is displayed:
- I wanna be your A-Team
- Value of counter increments by 1.
- counter = 3
4th iteration: counter = 3, following line is displayed:
- I wanna be your endgame, endgame
- Value of counter increments by 1.
- counter = 4
5th iteration: counter = 4, following line is displayed:
- I wanna be your endgame
- Value of counter increments by 1.
- counter = 5
6th iteration: counter = 5, following line is displayed:
- I wanna be your first string
- Value of counter increments by 1.
- counter = 6
7th iteration: counter = 6, following line is displayed:
- I wanna be your A-Team
- Value of counter increments by 1.
- counter = 7
- The program should keep going to finish out the current verse. So following line is displayed:
- I wanna be your endgame, endgame
- The loop breaks as the value of counter = 7 is greater than lines_of_sanity i.e. 6
- So at last the print("MAKE IT STOP") statement is execute which displays the following line:
- MAKE IT STOP
- The program along with the output is attached.
Have them post more positive outcomes and help them understand that what they post stays there forever