CSCI 40

Resources

Example C++ Program:

#include <iostream>

using namespace std;

int main() // 'main' function of the program, everything starts here

{

double loan, loan_tax; // Declare variable, doubles for decimal values

double loan_rate=0.03; // Set loan_rate  variable to 0.03 for 3%

cout << “Enter loan amount:”<<endl; // Output to console

cin >> loan; // Wait for user input, and store it into the loan variable (as a decimal value)

loan_tax = loan_rate * loan;  // Calculate loan_tax and store result into loan_tax variable

cout << “The loan tax is “<<loan_tax<<endl; //Output "The loan tax is" to the terminal, 

// followed by the value in the variable 'loan_tax'

return 0; // Exit the program safely

}


Online C++ Compilers:

C++ IDE's (Integrated Development Environments)

Vectors in C++ 

Vectors in C++ are sequence containers representing arrays that can change their size during runtime 


For while loop and for loop 

In the above video you can see the basic implementation of the while loop and for loop by taking an example of factorial of a number. For the for loop you guys will be seeing the example of a infinite loop here.

Genereal C++ Programming in C++


After seeing this video you guys will be able to do the basic programming and implement basic logic, Video is suggested to be watched along the class syllabus. There are also time stamps available in the video if you are already familiar with certain concepts just skip to the part you don't know.

Full Python Course

Python is rapidly becoming the most widely used programming languages in the world! This friendly course will teach you everything you need to know about programming with python.

Code Visualizer

Don't let the name fool you, you can use C++ on this site!

https://pythontutor.com/