double celsius_to_fahrenheit(double celsius) {// Replace code herereturn 0.0;}
Error
Errors:
Description
Write a function that returns the given celsius
temperature to fahrenheit
!
Note: The equation to convert celsius to fahrenheit is (celsius * 9/5) + 32
Test Cases
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
Write a function that returns the given celsius
temperature to fahrenheit
!
Note: The equation to convert celsius to fahrenheit is (celsius * 9/5) + 32
C++ Documentation
C++ Basics
Comments
Comparison Operators
Math
Strings
Function
Try/Catch Statements
Control Structures
If Statement
While Loop
For Loop
Input/ Output
Printing
User Input
There are two main ways to read input from the user.
cin
is used to read one token at a time.
getline
is used to read an entire line at a time.
File Input/Output
File input is done by opening a file as an input stream and then
reading in using the getline
command. Once
you capture a line, you can then process it before capturing
the next line.
File output is done by opening a file as an output stream and then streaminng into the file just like you would stream to the console.
Data Structures
Vectors
Arrays
util.h
The util.h file can be imported into any C++ program by using
#include "util.h"
Below is the header file for the
library.