Learn C++ With Me #4 - User Input and Constants
Key Takeaways
The video covers user input and constants in C++, including how to define constant variables, get input from the user using cin, and handle invalid input. It also discusses the importance of data types and type casting in C++.
Full Transcript
hello everybody and welcome to another c plus tutorial for beginners now in this video i'm going to be discussing how you get console input or how you get input from the user i'm also going to be discussing something i left out in the previous video that i meant to mention and just forgot which is constant variables so with that said let's get into the video [Music] so the first thing that i want to discuss here is something called constant variables now a constant just means that the value of a variable does not change so whenever you say something is a constant for example like gravity is a constant the rate of gravity does not change just like here in programming when we define a variable and the value should never change we make it a constant variable or a constant value so the way you create a constant variable is quite simply you put the keyword const c-o-n-s-t before your variable declaration there's a few rules when you use const which i'll discuss in a second but let's just do an example so i say const int let's actually just do the example i just said gravity and then we'll make that equal to negative 9.8 and then technically the uter unit is meters per second but we're not going to use that so we'll add our semicolon here so this is an example of a constant this variable here cannot change its value if i try to change the value of this variable i will get an error it will say this is a constant you cannot modify it this is what's known as a read only value so the point of having a constant is just to make your uh program more clear so it's easier to actually read through so rather than writing you know negative 9.8 say 25 times in a physics engine or something you would just define the constant gravity and then every single time you wanted to use gravity you would just refer to gravity so it's very good practice whenever you have a variable that is a constant that's not going to change and shouldn't change that you define it as a const and that just enforces in your program that it cannot change now one thing you cannot do with constants is you cannot not initialize them that's a double negative i apologize but if i said const int gravity like this let's imagine this line was commented out here this would be invalid i cannot define a const unless i give it a value immediately so if i actually compiled my program here i'm just going to save us the time of not doing this you would see that this would be an error so those are const i just wanted to go over those quickly whenever you see them just understand they are read only values they are meant to be accessed they could be used but you cannot change their value so now that we've discussed constant variables we can start talking about getting console input so we saw previously that there was this command called c out standing for characters output this is a part of the i o stream library so input output stream now as well as c out there's this thing called c in now it's pretty intuitive this stands for characters input but this time instead of using the what is it called stream insertion operator after this we use the stream extraction operator what this is going to do is extract the characters from the stream that we typed in the stream being the console and it's going to take whatever those characters are and it's going to try to convert them to a certain type and store them in a variable so in this case if i say c in and then i say the two greater than signs which is the always mess up this name uh what is this called again the stream extraction operator not an easy thing to remember what's going to happen is it's going to try to store all of the characters that we type before we press the enter key on our keyboard in the variable n now i need to define the variable n because right now n is not defined so when i define the variable that i want to hold whatever was typed in from the console i need to pick its type now the type i pick is the value or the type of input that we are going to be expecting the user to type in so for example if i say int this means that my console input or i'm expecting my user to input a value that is a number to input an integer to be specific if i don't input an integer i am going to get an error so i need to make sure i input an integer otherwise there's going to be a problem in my program and i'll show you how we fix that problem in a minute but anyways this is the most basic form of getting console input you define a variable you define the type of that variable this is the type that you were expecting the input to be you then write c in you write the stream extraction operator and then the variable that you want to store whatever was in the stream whatever the input was so let me show you what happens when i run this let me compile my program and let me run my program notice that what happens is my program is kind of sitting idle right now it's not really doing anything and my cursor is flashing what that means is i'm waiting for input from the user so in this case let me type something like three when i type three all is good no error it goes to the next line notice that after your input so after you press enter it automatically goes down to the next line and then my program is done and all is working so to make sure this actually worked properly though what i want to do now is see out the value of n to make sure it actually did get the correct value so let me c out n after i get the input and store that in the variable n so we can see what the variable n is equal to after it's assigned the input so let's do this again let's compile let's run let's type three notice it prints out three all is good now let's see what happens when i print something or when i type something in that's not valid input so actually let's go with 6.7 when i do 6.7 notice c plus plus is smart enough to realize that hey this is not an integer but i can convert it into an integer just by slicing off the flow so we go it goes ahead and does that and gives me the value six which is great it caused us not to have an error in our program and we still get some you know meaningful value although it's not the exact value that the user typed in however what happens when i type something in that cannot be converted to a string well if i type say hello in here notice we get the value zero now this does not mean that hello is equal to zero in fact just to prove this to you if i type in say y this also gives me zero the reason this gives me 0 is because there was an error in the c in kind of function program whatever you want to call it so it actually just assigned a default value of 0 to this variable because cn just returned the value 0 indicating that there was indeed an error now this is not super clear and whenever there's an error in c in what actually happens is it throws what's known as an error flag to the state of our console input stream or of our character's input stream what that means is after there's an error in any of our inputs because we can collect multiple inputs we don't have to do this just one time we can no longer collect any more inputs until we clear that error so this is very kind of hard to explain and strange because you can't really see all of this that's going on but as soon as we type in invalid input all of a sudden our character's input function or whatever you want to call it now throws an error flag to the console and this tells the console we need to resolve this error before we can collect any more input so to show you what i mean by this let's add another c in so let me just copy this and i'm going to go cn i'll make another variable let's just call this x and now we'll see in some value into x and we can also see out x after this as well so we'll see out n and we'll see x after we take our two inputs so let's try this now let's compile our program let's run the program and let's start with valid input so let's go with three and four notice it prints three four it didn't print the new line uh because we didn't tell it to print the new one so now if i want to print the new line i'll say end l let's recompile and let's run again and let's go three four and then we get three four right and it removed that space it just converted it into an integer okay great so now that we know that that works let's try this with invalid input so let me start by inserting something that's valid three now let me insert something that's inbound let's go with h as soon as i get do this i get three and then i get 0. the reason i get 0 is because c in return 0 because there was an error h is not a valid input it cannot be stored in the variable x right so i just automatically put 0 there now let's see what happens when i start with an invalid input so the first c in is inbound if i type h notice immediately it just stops the program actually just finishes and there we go the reason this happens is because our next cn right here cannot run notice it only asked me for one input right i just typed in h and then all of a sudden it printed out two values didn't ask me to type something else in that's because there's now an error in c in and since there's an error we need to clear that error before we can actually collect any more input from the user so that's something to keep in mind as soon as you have an invalid input you need to clear that invalid input to ensure that you can now collect more input afterwards now notice it prints out two kind of random values here so n is equal to zero the reason n is equal to 0 is because c in return 0 because this was invalid inputs that get assigned to the value n and then x has this random value right here now you can't really say anything about this random value the reason this is random is because at this point in time x is kind of just randomly holding something when you define variables in this way and you don't give them a value by default they're going to have some value that's just already stored in memory this is very difficult to explain without going too in depth but you can kind of imagine that all of our variables are sitting at some location in our computer's memory and until we tell that location what it should store it just has some random value inside of it we're not clearing anything out of our memory locations until they need to be used for something else so as soon as a variable is no longer being used then it just has the value it had before we don't we don't clear it out necessarily um at least in this kind of example right here this is very difficult for me to to explain again without getting too much in depth but just think of it like this value was being stored where x is and since we didn't assign anything to x it's just still storing that value so we just end up printing this random value i'm actually almost sure if we do this again let's just see what happens if we do this again we go h notice it prints the exact same thing so this is just what x is storing right now because we haven't set x to anything else so again that's why we get that random value not super important to understand that but now let me show you how we can fix this error right because this is annoying obviously if we type in invalid input here we want the rest of our program to still work properly we still want to be able to get input so we will continue in one second but i need to quickly thank the sponsor of this video and the series which is algo expert algo expert is the best platform to use to prepare for your software engineering coding interviews they have over 140 coding interview questions on the platform all of which have a conceptual overview and code walkthrough which are taught by the best instructors one of which is me check out algo expert from the link in the description and use the code tech with him for a discount on the platform so there's a certain way that we can do this first of all i'm going to show you how we can check if we got invalid input the way that we can check if we got invalid input is we can see out this right here which is called cn.fail now when you call this which is known as a method uh we'll discuss this later in the series what this tells you is whether or not there was a failure in your input or not so if there's a failure this right here is going to be equal to one if there was not a failure this is going to be equal to zero so let me just show you it's best to do this with an example let's compile our program let's run our program let me type something in let's type h notice we get zero printing out and then it's still oh what the heck did i not compile my program oh i didn't save it sorry this was running the previous version of my program i need to recompile it i was wondering why that was happening okay let's try this so if i type in h notice it prints out one the reason it prints out one is because there was a failure this was invalid right our input now let's run this again if i type in 1 we get 0 that means there was not a failure and all worked fine so you can check if there's a failure by looking at c in.fail this will be important when we can actually use this to say fix the failure automatically now we can also just fix a failure the way that we can fix a failure is by writing the following command when we write c in dot clear what this is going to do is clear the failure from our console input stream now this kind of works but you're going to see that we still get the same error even when we clear this error what this does is this removes the error flag from our console input stream however it does not remove the text that was typed in the string now i understand this is totally very vague and confusing especially if you've never seen something like this before but again what's happening is when there's an error we're throwing an error flag to the console so there's an error flag on the console what this clear clear line does is remove that error flag however it does not remove the text that is typed in right now to the console so we need to now remove the text that is typed into the console from kind of our console stream here otherwise we're going to get the exact same error happen again so what i do after this after i clear the error flag is i say c in and then i say dot ignore and what this does is ignore a set of characters in fact what we type is the following the number of characters that we want to ignore so to be safe you can just make this value super large and if the number of characters that were typed in was less than this value it will just ignore however many characters were typed in but let's make this something like a thousand what this means is that as soon as i hit this line cn.ignore if i had whatever number of characters i had typed in we're going to clear a thousand of those characters from the input stream so the next time i go to get input i am not considering those previous characters that were typed in because if i don't do this we're going to consider those previous characters so now what i add after this after this 1000 is i add a backslash n and what this is going to do and sorry this needs to be in double quotation marks not single quotation marks is going to skip us down to the next line so you saw previously what happened was as soon as we had a failure the next console input or the next line that executed happened right after that failure now i'll kind of show you this example again let me just uh get rid of these two lines let's say c in and let's go to x and then we'll just say c out and we'll see out here the value of n okay so let's run this program let's compile this just so i can show you what i'm talking about so let's run this and let's type in something invalid which is h notice we just print out zero immediately we just skip the c in however if i were to print out something else let's do this let's go c out and then let's go n and then let's go c out and let's do x let's see what this one looks like i'm trying to find a good example here okay so invalid and then what happens is it prints out zero and then it prints out whatever the next c out is immediately right because this c in since this didn't run it didn't move me to the next line so what happened was we kind of squished these two outputs together now that's no good we don't want to do that so what this backslash n does here on this line is it moves us down to the next line after there's a failure from our c in so now let's see what happens when i put these two lines right after the c out of n so now regardless of whether this was valid or not i'm going to clear any potential error flag i'm going to ignore a thousand characters i'm going to skip down to the next line and then hopefully the c in should just work so let's see again you can have a look at this code i don't want to fast forward through it too fast and let's go now so let's say g plus plus hyphen o and we seem to have gotten an error let's see what have i messed up here so it turns out i was actually right the first time when i had the single quotation marks this needs to be single quotation marks not double quotation marks the reason for this is dot ignore accepts two arguments arguments are just things that go inside of the parentheses when you call this and the things it accepts is an integer and then a character so rather than accepting a string it takes a character which means i need to put single quotation marks around this so now let me recompile that's kind of what the error was telling me there was an error with backslash n so let's run this there you go the compilation is good run the program and now let's do something that's going to error out so if i type h now notice it prints 0 but now it still lets me type something in right it doesn't immediately stop and go to the end of my program i can now type something in so now what i'm going to type in is hello and then i get 0 again because hello is invalid but if i run this one more time and i type say h which is invalid and then i type let's go like 12 12 actually works and now i can now print this out so some of you may be wondering why this didn't go down to the next line right because i was saying the reason we added the backslash n is so it moves down to the next line now technically the reason this happened is because after we did this c out here we didn't move to the next line so if i were to add a new line after this c out then this would actually work properly because the way it stands right now even if i type in two valid things without these two lines so let's actually do this if i go g plus and then run program and i type let's go one and then on the same line again it's asking me to type another number right and then it prints out two because i didn't add the new line after my first c out so technically this is actually working the way it's supposed to work and just to show you let's add an end line here this is what we probably should have done the first time let's compile let's run let's type in something invalid and then notice it goes down to the next line and now we can type something in so let's go with three three is valid it prints it out so hopefully that makes sense if the backslash n is not making sense to you don't worry about it just add it in to the end of dot ignore and this number here you can just make some you know arbitrarily large number that ignores the number of characters right so you want to make this at least as large as the number of characters you expect the user is going to type in it will then ignore that number of characters and then you will have bound input again so there you go that is kind of how you get console input i understand the cn.clear and ignore is kind of confusing but i just want to show you this because oftentimes you want to get multiple pieces of input and you can only get those other piece of input if all of the ones before it were valid so if you want to make sure that you're going to handle any situation where you potentially have invalid input you can just put this because even if you have these two lines right and then we run this and we actually type in two valid things we type in two and then we type in three this still works right clearing something that doesn't have an error just doesn't do anything and ignoring characters from the stream that aren't there just doesn't do anything either right because as soon as we get this input it will automatically kind of ignore the characters for us the only situation where we need this is where we have an error in the first input so hopefully that is clear the last thing i will show you here is how to build like a super simple calculator just so we can apply this into a little script so let's do this so i'm going to delete all this and what i want to accept is two integers so i'm going to say int num1 and num2 the idea being i want to take two numbers and then i want to add them together so what i'm going to say is co and i'm going to see out enter a number like that so i want the user to type a number i'm then going to say c in and i'm going to c in to num1 now notice i didn't add an endline here because what i want to happen is the user to type at the end of this right here so after this colon i have a space and then i want the user to start typing so i'm going to copy this line i'm going to put it right here so after the c in assuming i get valid input what's going to happen is it's going to move me down to the next line and then i will print enter and we can say a second number and then this one will be num2 then what i'm going to do is i'm going to say c out i'm going to see out the sum of these numbers so i'm going to say int sum equals num1 plus num2 and i'm just going to see out the sum like that and actually before i see out the sum i'll say the sum is colon and then a space and then whatever the sum is so there you go let's test this program out this should ask us to enter a first number a second number we should then add them and we should print out the sum so let's compile uh and we get an error what is oh num sorry this needs to be not num sum okay just a small typo uh i had num there instead of sum so let's try this again looks like we're all good run the program enter a number go three enter second number five the sum is eight awesome always working so now let's see what happens if we have an error by type h notice that it just you know crashes and just goes through the rest of the lines because we now cannot get the second console input so our second number we don't assign it some value so it has whatever was just stored in memory at that location beforehand so if we wanted to fix that we would need to add the lines i showed you before we're going to say cn dot clear and then we're going to say cn dot ignore and we're going to ignore a thousand and then we're going to say back slash n like that okay so let's add our semicolon let's try this now so compile run let's enter an invalid number let's just go with he okay it still moves us down to the next line type in number three then notice the sum is three because the first number here will just be equal to zero we will add it to three and then all will be good so the last thing i'll show you here is how we can get an input that is a string or is a float because i realize i didn't show you how to get any other type of input so let's create a variable here and let's say string let's just call it s y naught and then we will say c in and we will c in 2s and then we will c out and we will see out so just a super simple example so let's go and compile our code so i'm going to compile it here and then so i want to run my program i guess i hadn't already typed that in this console so run program notice my cursor is ticking now i type hello and hello print out so that's as simple as it is to get string input anything you type when you have string as your input type will be valid so even if i type and let's just run the program here say 1 this is still val the reason this is valid is because when you write string as your data type here anything can be converted into a string so even if i type a number that can be converted into a string we just put double quotation marks around it boom there we go we have a string uh even if i type like a boolean right like true this just converts to a string that just works fine uh if i type say like 1.6 works it's a string so it's always safe to use a string as your input type if you don't care about the actual value like you don't care about say adding two numbers together then you can just use a string however if you want to get the integer representation of a number you would want to use int right you would want this variable to be an int and just as a little brief example here before we end the video let me show you what happens when i try to add something to s so let's actually create a new variable here actually i can't do a new variable because it will give it away let's do something like s plus one okay so let's say i want to add 1 to s let's see what happens when i actually try to do that so when i do that i'm going to run i'm sorry i need to recompile my program so let's recompile we get an error the reason we get an error here is because well we cannot add an integer to a string so that's just to show you that if you wanted to say add a number or add something to the number that's inputted you would want that number to be an int or you would have to convert what is typed in from a string to an int which we're not going to talk about now we'll talk about in later videos so hopefully this didn't confuse you too bad but the idea is just that the type really does matter and when i say string this means whatever's typed in even if i type an int it's going to be a string which means i can't do something like add a number to it because that's just an undefined operation how do you add one to the string tim right there's just that's undefined there's no way to do that so hopefully that kind of makes sense but i just want to show you string now of course if you made this float this will just work like if you type a floating point value you will get a floating point value if you type an integer value this will work as well because any end can be represented as a float if you type a string well you'll get an error because you cannot convert a string to an int so hopefully that's clear but with that said i'm now going to conclude this video i hope this was helpful to you if it was make sure you have a like subscribe to the channel i will see you in another c plus tutorial
Original Description
Welcome to another C++ tutorial for beginners. In this video, I'll be discussing how you get console input, or how you get input from the user. I'm also going to be talking about constant variables, as I meant to mention the in the previous video but forgot. Hope you enjoy!
💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" https://algoexpert.io/techwithtim
🔍 Playlist: https://youtube.com/playlist?list=PLzMcBGfZo4-lmGC8VW0iu6qfMHjy7gLQ3
⭐️ Timestamps ⭐️
00:00 | Introduction
00:28 | Constant Variables
02:26 | User Input
07:32 | cin Errors
10:35 | cin Errors Fix
18:04 | Building a Simple Calculator
20:34 | String Input
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: https://tech-with-tim.teachable.com/p/the-fundamentals-of-programming-with-python
👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop
🔗 Social Medias 🔗
📸 Instagram: https://www.instagram.com/tech_with_tim
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/twt
📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/
🌎 Website: https://techwithtim.net
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim
🎬 My YouTube Gear 🎬
🎥 Main Camera (EOS Canon 90D): https://amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): https://amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): https://amzn.to/2Yuol5r
🕹 Tripod: https://amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): https://amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): https://amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): https://amzn.to/3oi0v8Z
☀️ Lights: https://amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): https://amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): https://amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): https://amzn.to/2B2IXcQ
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Tech With Tim · Tech With Tim · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A* Path Finding Algorithm(Visualization)
Tech With Tim
Python Programming Tutorial #1 - Variables and Data Types
Tech With Tim
Python Programming Tutorial #2 - Basic Operators and Input
Tech With Tim
Python Programming Tutorial #3 - Conditions
Tech With Tim
Python Programming Tutorial #4 - IF/ELIF/ELSE
Tech With Tim
Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Tech With Tim
Python Programming Tutorial #6 - For Loops
Tech With Tim
Python Programming Tutorial #7 - While Loops
Tech With Tim
Python Programming Tutorial #8 - Lists and Tuples
Tech With Tim
Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Tech With Tim
Python Programming Tutorial #10 - String Methods
Tech With Tim
How to Overclock a NVIDIA GPU
Tech With Tim
Python Programming Tutorial #11 - Slice Operator
Tech With Tim
Python Programming Tutorial #12 - Functions
Tech With Tim
Python Programming Tutorial #13 - How to Read a Text File
Tech With Tim
Python Programming Tutorial #14 - Writing to a Text File
Tech With Tim
Python Programming Tutorial #15 - Using .count() and .find()
Tech With Tim
Python Programming Tutorial #16 - Introduction to Modular Programming
Tech With Tim
Python Programming Tutorial #17 - Optional Parameters
Tech With Tim
Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Tech With Tim
Python Programming Tutorial #19 - Global vs Local Variables
Tech With Tim
Python Programming Tutorial #20 - Classes and Objects
Tech With Tim
Cool VBS Script to Prank Your Friends!
Tech With Tim
How to Overclock an AMD GPU
Tech With Tim
Best GPU'S For Mining Ethereum (2018)
Tech With Tim
Recursion and Memoization Tutorial Python
Tech With Tim
Ethereum Mining Rig - Hardware Guide
Tech With Tim
Pygame Tutorial #1 - Basic Movement and Key Presses
Tech With Tim
How to Install Pygame (Windows 8/10)
Tech With Tim
How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
Tech With Tim
How to Mine Ethereum 2018 - WORKING (Super-Easy)
Tech With Tim
Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Tech With Tim
Pygame Tutorial #2 - Jumping and Boundaries
Tech With Tim
Pygame Tutorial #3 - Character Animation & Sprites
Tech With Tim
Pygame Tutorial #4 - Optimization & OOP
Tech With Tim
OBS Studio Tutorial - Best OBS Settings
Tech With Tim
Linear Search Algorithm - Python Example and Code
Tech With Tim
Make Any Mic Sound AMAZING! (WITH OBS)
Tech With Tim
Binary Search Algorithm - Python Example & Code
Tech With Tim
Pygame Tutorial #5 - Projectiles
Tech With Tim
Pygame Game - Mini Golf
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 1)
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 2)
Tech With Tim
Pygame Tutorial #6 - Enemies
Tech With Tim
Pygame Tutorial #7 - Collision and Hit Boxes
Tech With Tim
Pygame Tutorial #8 - Scoring and Health Bars
Tech With Tim
Cloud Mining vs. Hardware Mining - 2018
Tech With Tim
How to Install Pygame on Mac OSX (Fast-Simple)
Tech With Tim
Pygame Tutorial #9 - Sound Effects, Music & More Collision
Tech With Tim
Pygame Tutorial #10 - Finishing Touches & Next Steps
Tech With Tim
How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
Tech With Tim
How to Create a Button in Pygame [CODE IN DESCRIPTION]
Tech With Tim
Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Tech With Tim
Pygame Side-Scroller Tutorial #2 - Random Object Generation
Tech With Tim
Pygame Side-Scroller Tutorial #3 - Collision
Tech With Tim
Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Tech With Tim
How to Create A Message Box in Python - Tkinter
Tech With Tim
Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Tech With Tim
How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
Tech With Tim
Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Tech With Tim
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
Automated Property Tax Appeal Letters for Homeowners: Earn $500–$2,000/Month with Manus AI
Dev.to AI
I Let AI Write Every SQL Migration for a Year. One Rollback Nearly Took Down Production.
Medium · AI
What I learned building a directory of 329 AI tools
Dev.to · Joseph Skaf
Turn any AI prompt into a Mac keyboard shortcut
Dev.to AI
Chapters (7)
| Introduction
0:28
| Constant Variables
2:26
| User Input
7:32
| cin Errors
10:35
| cin Errors Fix
18:04
| Building a Simple Calculator
20:34
| String Input
🎓
Tutor Explanation
DeepCamp AI