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
In the lan protocol architecture the _________ layer is responsible for detecting errors and discarding any frames that are in e
Korolek [52]
The MAC (Medium Access Control) layer is responsible for this.
7 0
3 years ago
Which unique address is a 128-bit address written in hexadecimal?
pentagon [3]
Every hexadecimal digit represents 4 bits, so the address has 128/4 = 32 digits.

A GUID (Globally Unique IDentifier) has 128 bits. They are usually written like this:

{38a52be4-9352-4<span>53e-af97-5c3b448652f0}.</span>

There are different types of guids, depending on how they are generated. The first digit of the third group reveals the type. In the example above it is 4. A type 4 guid is fully random (except of course for the 4).

3 0
3 years ago
"Using the printf method, print the values of the integer variables bottles and cans so that the output looks like this: Bottles
Anika [276]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       

       System.out.println("Enter the number of bottles and cans:");

       int numberOfbottles = in.nextInt();

       int numberOfcans = in.nextInt();

       System.out.printf("Bottles: %8d\n", numberOfbottles);

       System.out.printf("Cans:    %8d\n", numberOfcans);

}

}

Explanation:

Ask user to input the number of bottles and cans using Scanner class

Print the results so that the numbers to the right line up (Since we know that the numbers have at most 8 digits, we can use %8d in printf. Also, be aware that how printf statements are written so that the numbers line up)

6 0
3 years ago
_____ regulate current/voltage flow, similar function as _____,but are smaller, cheaper, and more reliable.
Tpy6a [65]

Direct Current Power regulates current/voltage flow, similar function as unregulated or regulated, but is smaller, cheaper, and more reliable.

<h3>What is Direct Current Power?</h3>
  • In contrast to the flow of a river, direct current is a technique in which electricity constantly flows in the same direction. It speaks about the flow of electricity produced by batteries, solar cells, and other sources.
  • Alternating current (AC), on the other hand, is a technique in which the positive and negative sides are consistently swapped at regular intervals, changing the direction of the electricity flow in accordance.
  • This is the electricity that comes from a generator or a plug-in.
  • Alternating current is used to transmit both the electricity generated at power plants and the electricity delivered to houses.

To learn more about Direct Current Power, refer:

brainly.com/question/1402412

#SPJ4

8 0
2 years ago
"1jaiz4 and 1 more users found this answer helpful" - who the heII is 1jaiz4?
ziro4ka [17]

Answer:

My suspicioun is that they are fake engagements/profiles created by Brainly to boost the reputability of the answer.

Explanation:

TLDR; it's probably fake

3 0
3 years ago
Other questions:
  • The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
    7·1 answer
  • Of the key reasons for creating organizational units which of the following is not one of them?
    13·1 answer
  • 2 A_______<br> uses graphics or pictures to help the user navigate and<br> access programs
    14·1 answer
  • A computer essentially takes input, processes it, and produces output. Which person developed a machine in the mid-1880s that ac
    6·1 answer
  • Write the definition of a function named isSorted that receives three arguments: an array of int , an int that indicates the num
    11·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    14·1 answer
  • How do operating system work?
    5·1 answer
  • Help! ASAP! 1 Question.........°○°​
    11·1 answer
  • It's in Python, everything sort of explained in the image below,
    5·1 answer
  • Technology?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!