-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutputDemoLec3.cpp
More file actions
38 lines (29 loc) · 1.1 KB
/
Copy pathOutputDemoLec3.cpp
File metadata and controls
38 lines (29 loc) · 1.1 KB
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
//************************************************************************
// Author: Rolando Rey Carreon
// Date: 30 Jan 2025
// Language: C++
// Assignment: OutputDemoLec3
// Description: Lecture 3 Output Demonstration
//************************************************************************
// include other code, in this case required code //
#include<iostream>
using namespace std;
int main()
{
// declare local varibles here //
// local varible Dev defined "Age" //
int age = 25;
// local varible Dev defined "Height" //
double height = 180.5;
// display text or character out Dev defined "text" //
cout << "Hello World\n";
// display "Age" variable or Charcter out Dev defined "Age" //
// ending in varible prefer using "endl;" //
// spaces inbetween "cout" is not required to run correctly but harder to read //
cout<<"Age: "<<age<<endl;
// display "Height" varible or Character out Dev defined "Height" //
// ending in text prefer using "\n" //
cout << "Height: " << height << "cm\n";
// return 0 if runs correctly, returns 1 if error //
return 0;
}