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
Inessa05 [86]
4 years ago
8

I'm doing C++. When i multiply 200000 by 200000, i get 1345294336. I wrote

Computers and Technology
1 answer:
egoroff_w [7]4 years ago
4 0
Even though your variable x is large enough to hold the answer 40000000000, the constants 200000 are treated as integers, such that the multiplication is first fitted in an integer that is too small.

The solution is to use the 'LL' suffix on the constants, so that the compiler knows to treat them as long longs from the start:

long long x = 200000LL * 200000LL;

The number <span>1345294336 can be explained by ANDing 40000000000 with 0xFFFFFFFF (which is the maximum size of an unsigned long)</span>
You might be interested in
Police officers conducting traffic stops on minority drivers more than non-minority drivers is an example of what?
MAXImum [283]

Answer:

Cultural bias

Explanation:

Certain verifiable studies have been made across the United States of America on traffic stops, which revealed significant cases of cultural/racial bias. Black people were 20 percent more likely to be stopped and searched by the police than white people.  

Within a six-year period, starting from 2011, researchers studied over 100 million traffic stops cases which were carried out by twenty-one state patrol agencies.

7 0
3 years ago
Derek has an interest in designing video games. What requirements should he fulfill to be a game designer?
dolphi86 [110]
Compooter science :D
3 0
3 years ago
Yahoo Messenger is an example of a/an __________ service on the Internet.
barxatty [35]

Answer:

Yahoo Messenger is an example of a service on the Internet.

7 0
3 years ago
Read 2 more answers
Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he o
Dmitriy789 [7]

Answer:

The solution code is written in Python 3

  1. count = 0
  2. sum = 0
  3. num = input("Enter a number: ")
  4. while(num != ''):
  5.    sum += float(num)
  6.    count += 1
  7.    num = input("Enter a number: ")
  8. print("Sum : " + str(sum))
  9. print("Average: " + str(sum / count))

Explanation:

Firstly, we declare two variables count and sum to hold the number of input number and the total of the input number, respectively (Line 1-2)

Next, we prompt user to input the first number (Line 4). While the num is not ' ' (This means it is not "Enter" key), accumulate the num to sum variable and increment count by one (Line 6-8) and then prompt the user to input the next number (Line 9).

At the end, display the sum and average using print function (Line 11 -12).

5 0
4 years ago
A MAC Frame format has a Preamble of 7 octet pattern in the form of alternating 1s and 0s used by a receiver to establish synchr
Dmitrij [34]

Answer:

The Manchester encoding to describe the first octet pattern signal within the preamble is 10101010

Explanation:.

Solution

Given that:

The first octet value of Preamble is 10101010

The Manchester encoding to outline or describe the first octet of the signal pattern produced or created within the preamble is 10101010

Note: Kindly find an attached image of the first octet signal pattern produced below.

6 0
3 years ago
Other questions:
  • Can somebody help me?
    11·1 answer
  • Where should the Analytics tracking code be placed in the HTML of a webpage for data collection?
    10·1 answer
  • *blank* is the unauthorized copying and selling or distributing of licensed video games.
    10·1 answer
  • URGENT!!Motors and gears play an important role in the motion of robots. Discuss the different types of motors used in robotics.
    9·1 answer
  • Children's Web sites may combine educational and entertaining information and activities with interactive advertising and direct
    5·2 answers
  • Melinda completed the Computer Programming Aptitude Test when she applied for a position with Beta Electronics. Six months later
    14·1 answer
  • Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to
    12·1 answer
  • Write a program that declares an array named myArray with 8 components of the type int. Initialize the array to 8 values that th
    6·1 answer
  • What are interpersonal skills for non-technical user
    14·1 answer
  • Once the data center routes to the destination server that hosts the website, what's the next step in the Internet process?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!