CSC noobie help

Hello brand new to programming and I need a little boost if possible. I'm sure this is something simple but I am receiving an error with this project:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

#include <iostream>
using namespace std;

int main() 
{
    float celsiusAtDepth,
            toFahrenheit,
            depth;
    
    //cout asking for user input
    cout << "Please input the depth in km: ";
    cin >> depth;
    
    //Calculations needed to find temperatures
    celsiusAtDepth = 10 * depth + 20;
    toFahrenheit = 1.8 * celciusAtDepth + 32;
    
    //cout to display temperatures
    cout << "The temperature is " << celsiusAtDepth << " degrees Celcius, and " << toFahrenheit << " degrees Fahrenheit.";
    return 0;
}


I am unsure what is wrong and I've spent days trying to figure it out!
This is the error I got from compileonline:
main.cpp: In function ‘int main()’:
main.cpp:13:24: error: ‘celciusAtDepth’ was not declared in this scope
toFahrenheit = 1.8*celciusAtDepth+32;
Thanks!
What lines are all your errors?
closed account (2UD8vCM9)
Line 17: hint: spell celsiusAtDepth
Topic archived. No new replies allowed.