1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nimfa-mama [501]
3 years ago
14

For C++ (please make sure it runs properly)

Computers and Technology
1 answer:
Jlenok [28]3 years ago
7 0

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 };

You might be interested in
A phone call costs $0.58 plus $0.15 cents per minute. If the total charge for the call was $4.78, how many minutes was the call?
fredd [130]

4.78X=0.58 +0.15
-0.58 -0.58
4.20X= 0.15
/0.15 /0.15
X = 28
5 0
3 years ago
Im confused sorry.. can i get help?
garik1379 [7]

1.

If-then statements are used in a program to run certain code when ideal conditions are met.

2.

Since the variable word holds the word kangaroo and the if statement is asking if the variable word is equal to KANGAROO, the else statement will run. The output will be FALSE

3.

if (90 < = x <= 100) should be rewritten as Nothing, the if statement is correct.

4.

You use an else statement when you want your code to do something if your if statement is false.

5.

if (num1 != num2)

I hope this helps!

7 0
3 years ago
Anyone wanna hop on 1v1.lol<br> party code : usfhb6
hjlf

Answer:

thx for the points

Explanation:

8 0
3 years ago
Read 2 more answers
Write a method that determines the total number of chars in each string of an array.
Serjik [45]
The total number of chars in each string is basically the size of each string.

Using JAVA:

        String[] arr = {"hello", "my", "name", "is", "Felicia"};                int count = 0;        for(int i = 0; i < arr.length; i++) {            count = count + arr[i].length();            System.out.println("Characters in " + arr[i] + ": " + count);        }

Output: 
<span>Characters in hello: 5
Characters in my: 7
Characters in name: 11
Characters in is: 13
Characters in Felicia: 20</span>


8 0
3 years ago
True or False: From an antiterrorism perspective, espionage and security negligence are considered insider threats.
Oksanka [162]
MAYBE is false...............
6 0
3 years ago
Read 2 more answers
Other questions:
  • You are working the 8:00 AM shift at the help desk. An irate user who fails to identify himself calls in claiming that his works
    7·1 answer
  • You can deselect multiple selected sheets beginning with the sheet1 tab by pressing the ____ key and clicking the sheet1 tab.
    15·1 answer
  • Plz help! 3 questions! 1.The ideal light to use is.... A.front light B.a combination of side and back light C.a combination of f
    10·1 answer
  • Implement function translate() that provides a rudimentary translation service. The function input is a dictionary mapping words
    9·1 answer
  • Identify the false statement.
    8·1 answer
  • What specific database stores local user accounts on local computers, and allows users to sign in to and access resources only o
    9·1 answer
  • is the process of creating a message to be communicated. a. Encoding b. Decoding c. Receiving d. Sending
    10·2 answers
  • Match the elements of a web page with their description
    15·2 answers
  • If you get a flat tire on the side of the road, what do you do.
    6·1 answer
  • When considering the best technology for its particular use, what should a business consider
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!