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
gavmur [86]
2 years ago
5

C++ see attached file for quesion

Computers and Technology
1 answer:
sveticcg [70]2 years ago
7 0
The picture doesn’t load.
You might be interested in
Write a program that accepts a number as input, and prints just the decimal portion.
Olegator [25]

<u>Answer:</u>

<em>There are 2 ways to do extract the decimal part: </em>

<u>Explanation:</u>

  • <em>First method using number  </em>

<em>int main() { </em>

<em>  double num = 23.345; </em>

<em>  int intpart = (int)num; </em>

<em>  double decpart = num - intpart; </em>

<em>  printf(""Num = %f, intpart = %d, decpart = %f\n"", num, intpart, decpart); </em>

<em>} </em>

  • <em>Second method using string: </em>

<em>#include <stdlib.h> </em>

<em>int main() </em>

<em>{ </em>

<em>    char* inStr = ""123.4567"";          </em>

<em>    char* endptr;                       </em>

<em>    char* loc = strchr(inStr, '.'); </em>

<em>    long mantissa = strtod(loc+1, endptr); </em>

<em>    long whole = strtod(inStr, endptr);  </em>

<em>    printf(""whole: %d \n"", whole);      </em>

<em>    printf(""mantissa: %d"", mantissa);   </em>

<em>} </em>

8 0
2 years ago
Read 2 more answers
Suppose you have a string matching algorithm that can take in (linear)strings S and T and determine if S is a substring (contigu
Zielflug [23.3K]

Answer:

no seishsssssssssssssssssssss

8 0
2 years ago
Read 2 more answers
In powerpoint a point is _____ of an inch in height.
USPshnik [31]
 a fraction

I think it is correct.

Hopefully it helps.
6 0
3 years ago
Who invented the balloons?
Alexandra [31]
<span>Professor Michael Faraday</span>
6 0
3 years ago
Read 2 more answers
How to change the size of my document in cs6?
Aleonysh [2.5K]
When you're saving your image, it will ask you what quality of the image you want to use and it will show you that you're using a larger or smaller filesize depending on the quality of the image your saving.

<TIP>  Make a duplicate layer before saving the image and uncheck the original. Always save the CS6 file too to re-edit later if need be. But that way you will have the file size you want and the original image is preserved
5 0
3 years ago
Other questions:
  • When using a wireless mouse, what is the most common port used for the transmitter? 
    7·1 answer
  • Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space a
    10·1 answer
  • CodeHS 3.4.5. What is the code for four colored triangles.
    8·1 answer
  • How does the financial market impact the economy?
    10·1 answer
  • Which type of CPU instruction performs arithmetic calculations and stores the results in memory?
    14·2 answers
  • The signature area in a cover letter includes the sender's first and last name, followed by his/her job title (if applicable). *
    13·1 answer
  • Please answer the following question in Verilog.
    11·1 answer
  • 10 sentences about computer parts.
    5·1 answer
  • Which excel feature makes it easy to copy and paste formulas in multiple cells?.
    7·1 answer
  • Think about all the different ways you communicate with other people throughout your day. • What makes this communication succes
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!