Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 470 Bytes

Cpp-Udemy.md

File metadata and controls

49 lines (38 loc) · 470 Bytes

C++ Udemy

Variables

Datatypes

  • int
  • short
  • float
  • double
  • char
  • bool
  • also can add unsigned
#include <iostream>

main()
{
	cout << 4 << endl; // endl for endline
	int A = 4;
}

Getting input

#include <iostream>

using namespace std

main() {
	char *example;
	cin >> example;

	cout << "test";
}

5: Arrays

main() 
{
	int arr[3] = {3,4,5};
 	for (int i=0; i < 3; i++) {
 		cout << arr[i] << endl;
 	}
}