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]
2 years ago
14

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

Computers and Technology
1 answer:
Jlenok [28]2 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(n) ________ file contains data that has been encoded as text, using one of the computer's encoding schemes.
tangare [24]

Hello there

the answer is text

hope this helps

Queen Z

8 0
2 years ago
Read 2 more answers
Capacity requirements are computed by multiplying the number of units scheduled for production at a work center by the:
podryga [215]

Answer:

.

Explanation:

5 0
3 years ago
What is the term for the typical layout of the keys on a keyboard?
stepan [7]
I think the answer is B
3 0
3 years ago
Read 2 more answers
If you like to play graphic-intensive games on your computer and you find that your computer can't keep up, you should add a ___
s344n2d4d5 [400]
I think its video card tell me if i'm wrong
6 0
3 years ago
Which command is used to format a partition on a hard disk drive with the ext4 filesystem?
FinnZ [79.3K]
Mkfs -t ext4 /dev/file
5 0
3 years ago
Other questions:
  • What is used for World Wide Web?
    7·1 answer
  • The global network that links millions of computers is the
    9·2 answers
  • What is a strictly layered pattern, provide an example of its usage.
    13·1 answer
  • The World Wide Web (WWW) is a network of links on the Internet to documents containing text, graphics, video, and sound, but doe
    10·1 answer
  • What is meant by backing up files through cloud computing?
    5·2 answers
  • What is the purpose of application software policies?
    12·1 answer
  • In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the qualit
    9·1 answer
  • Write a program to check the password( qbasic)​
    8·1 answer
  • Which option on the Format tab is used to modify particular portions of the chart?
    13·1 answer
  • Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!