From f6dc5a0b929bdae3c0b95bf10e0f2358202ee3df Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 06:02:06 -0800 Subject: [PATCH 01/23] Update helloworld.cpp --- helloworld.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helloworld.cpp b/helloworld.cpp index c704e01..84aab7c 100644 --- a/helloworld.cpp +++ b/helloworld.cpp @@ -2,9 +2,9 @@ /* The following c++ code is A fundamental componenet of every c++ programming */ -#include +#include //header using namespace std; int main() { -cout << "Hello World!"; +cout << "Hello World!"; // c++ statement return 0; -} +} //end of the main function/ program From 466bd55a262efcaad03426114dd0b0ae2b0d8201 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 06:32:25 -0800 Subject: [PATCH 02/23] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 0711d91..b184014 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # C-plusplus-programming-for-beginners If you're new to programming, this tutorial will show you how to program from scratch using c++ programming language using a simple example with comprehensive explanations. +Note: +1. Any line that starts with /* and ends with */ are comments, it doesn't make any changes to your code. Allows the programmer to add a description about the code. It's also called multiline comment. +2. Anything after double forward slash or // to the end of the line is also considered to be a single line comment of the code. +This code contains only one function, main (). +Every c++ program must have main() function. +As usual, execution begins at main function. + From 8a3e8c6fa6e1f75afe22f102043bde6472f7bd96 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 06:34:11 -0800 Subject: [PATCH 03/23] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b184014..2a55ca7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # C-plusplus-programming-for-beginners If you're new to programming, this tutorial will show you how to program from scratch using c++ programming language using a simple example with comprehensive explanations. + Note: 1. Any line that starts with /* and ends with */ are comments, it doesn't make any changes to your code. Allows the programmer to add a description about the code. It's also called multiline comment. 2. Anything after double forward slash or // to the end of the line is also considered to be a single line comment of the code. + This code contains only one function, main (). + Every c++ program must have main() function. + As usual, execution begins at main function. From 4139ebf137e918dbef7bf86d620c3a830d4891ae Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 06:35:34 -0800 Subject: [PATCH 04/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a55ca7..742172a 100644 --- a/README.md +++ b/README.md @@ -9,5 +9,5 @@ This code contains only one function, main (). Every c++ program must have main() function. -As usual, execution begins at main function. +As usual, execution begins at main() function. From 639e59089bc3b4a1e4ef397b60aa0ef72d5bc96c Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 07:20:45 -0800 Subject: [PATCH 05/23] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 742172a..b3a6664 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,14 @@ Note: 1. Any line that starts with /* and ends with */ are comments, it doesn't make any changes to your code. Allows the programmer to add a description about the code. It's also called multiline comment. 2. Anything after double forward slash or // to the end of the line is also considered to be a single line comment of the code. -This code contains only one function, main (). +Line 6 defines the scope of the identifiers used in the program. -Every c++ program must have main() function. +The iostream header file should be included at the beginning of all programs that use input/output statements. +This code contains only one function, main (). +Every c++ program must have main() function. As usual, execution begins at main() function. +The statement on line 8 causes the string in quotation marks to be displayed on the screen. + +In c++, every main function should end with a return(0) statement, otherwise a warning or an error can occur. From 57a1aaeaeb13a05da42c92bdf2ff468daacc3b12 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 07:22:28 -0800 Subject: [PATCH 06/23] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b3a6664..2210cd7 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Line 6 defines the scope of the identifiers used in the program. The iostream header file should be included at the beginning of all programs that use input/output statements. This code contains only one function, main (). + Every c++ program must have main() function. + As usual, execution begins at main() function. The statement on line 8 causes the string in quotation marks to be displayed on the screen. From 6ae04b08b78c37d082b606f3902be00c469cf049 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 08:22:40 -0800 Subject: [PATCH 07/23] Create Reading-user-input.cpp --- Reading-user-input.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Reading-user-input.cpp diff --git a/Reading-user-input.cpp b/Reading-user-input.cpp new file mode 100644 index 0000000..ee8eda0 --- /dev/null +++ b/Reading-user-input.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; +int main() { +int num; +cout << "please input your age."; // c++ statement. +cin>>num; //reading value from the users. +cout<<"your age is : "< Date: Tue, 8 Dec 2020 08:59:08 -0800 Subject: [PATCH 08/23] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 2210cd7..8016862 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # C-plusplus-programming-for-beginners + + helloworld.cpp +============================================================================================================================================================================ If you're new to programming, this tutorial will show you how to program from scratch using c++ programming language using a simple example with comprehensive explanations. Note: @@ -18,3 +21,10 @@ As usual, execution begins at main() function. The statement on line 8 causes the string in quotation marks to be displayed on the screen. In c++, every main function should end with a return(0) statement, otherwise a warning or an error can occur. + + +================================================================================================================================================================================ + + + + From 80c8c03982b75a9eaae14e11f97433e0bd30eb7d Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 10:12:16 -0800 Subject: [PATCH 09/23] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8016862..856f49b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # C-plusplus-programming-for-beginners - helloworld.cpp -============================================================================================================================================================================ +**helloworld.cpp** +================================================================ If you're new to programming, this tutorial will show you how to program from scratch using c++ programming language using a simple example with comprehensive explanations. Note: @@ -22,7 +22,7 @@ The statement on line 8 causes the string in quotation marks to be displayed on In c++, every main function should end with a return(0) statement, otherwise a warning or an error can occur. - +**Reading-user-input.cpp** ================================================================================================================================================================================ From 1bc6f722b190ea2263cda2890550542d9dea9e4f Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 10:28:57 -0800 Subject: [PATCH 10/23] Update Reading-user-input.cpp --- Reading-user-input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Reading-user-input.cpp b/Reading-user-input.cpp index ee8eda0..4808749 100644 --- a/Reading-user-input.cpp +++ b/Reading-user-input.cpp @@ -2,8 +2,8 @@ using namespace std; int main() { int num; -cout << "please input your age."; // c++ statement. +cout << "Please input your age."; // c++ statement. cin>>num; //reading value from the users. -cout<<"your age is : "< Date: Tue, 8 Dec 2020 10:48:25 -0800 Subject: [PATCH 11/23] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 856f49b..bd3e62b 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,12 @@ In c++, every main function should end with a return(0) statement, otherwise a w **Reading-user-input.cpp** ================================================================================================================================================================================ +Line 4 is used to declare a variable with an integer data type. +Now we've got three statements within the main function, these are: +-Line 5 to give instructions to the user, +-Line 6 to read input from the user and +-Line 7 to display the user input back to the screen. From 4f2aa8372f99cbeb5d23cfb73bd5e831ac573db9 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 10:51:15 -0800 Subject: [PATCH 12/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd3e62b..b478344 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Line 4 is used to declare a variable with an integer data type. Now we've got three statements within the main function, these are: -Line 5 to give instructions to the user, -Line 6 to read input from the user and --Line 7 to display the user input back to the screen. +-Line 7 to display the user input back to the screen. From 8a91ca7d982700daaa6c3fc0d13d9f6bb216758f Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 10:51:48 -0800 Subject: [PATCH 13/23] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b478344..6046a94 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ In c++, every main function should end with a return(0) statement, otherwise a w Line 4 is used to declare a variable with an integer data type. Now we've got three statements within the main function, these are: + -Line 5 to give instructions to the user, -Line 6 to read input from the user and -Line 7 to display the user input back to the screen. From ba9a941da23db7b1964021edb202bd76f8c400f4 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:05:39 -0800 Subject: [PATCH 14/23] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6046a94..b2eb4f9 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ Line 4 is used to declare a variable with an integer data type. Now we've got three statements within the main function, these are: --Line 5 to give instructions to the user, --Line 6 to read input from the user and --Line 7 to display the user input back to the screen. +*Line 5 to give instructions to the user, +*Line 6 to read input from the user and +*Line 7 to display the user input back to the screen. From 76e31f5f2de0e848bad5854990694493bffd240c Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:09:50 -0800 Subject: [PATCH 15/23] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2eb4f9..67b25c8 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ Line 4 is used to declare a variable with an integer data type. Now we've got three statements within the main function, these are: -*Line 5 to give instructions to the user, -*Line 6 to read input from the user and -*Line 7 to display the user input back to the screen. +* Line 5 to give instructions to the user, +* Line 6 to read input from the user and +* Line 7 to display the user input back to the screen. From e7046430bfa2206da086326fbd060effdd052185 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:14:20 -0800 Subject: [PATCH 16/23] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67b25c8..8690809 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,11 @@ In c++, every main function should end with a return(0) statement, otherwise a w **Reading-user-input.cpp** ================================================================================================================================================================================ -Line 4 is used to declare a variable with an integer data type. -Now we've got three statements within the main function, these are: +Now we've got four statements within the main function, these are: + +* Line 4 is used to declare a variable with an integer data type. * Line 5 to give instructions to the user, * Line 6 to read input from the user and * Line 7 to display the user input back to the screen. From e06328b15e32794dbede8b982e821761b5d6a6ee Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Tue, 8 Dec 2020 11:15:18 -0800 Subject: [PATCH 17/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8690809..11cbe21 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ In c++, every main function should end with a return(0) statement, otherwise a w Now we've got four statements within the main function, these are: -* Line 4 is used to declare a variable with an integer data type. +* Line 4 is used to declare a variable with an integer data type, * Line 5 to give instructions to the user, * Line 6 to read input from the user and * Line 7 to display the user input back to the screen. From 3c84f9d644f120a30549932bbdd37b64141c549d Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:49:10 -0400 Subject: [PATCH 18/23] Create ifStatement --- ifStatement | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ifStatement diff --git a/ifStatement b/ifStatement new file mode 100644 index 0000000..1aa7a24 --- /dev/null +++ b/ifStatement @@ -0,0 +1,12 @@ +#include +using namespace std; +int main() { +int a = 3; +int b = 4; +if(a>b){ + +}else{ + +} +return 0; +} From b526721e02f7c8bd85f9701dd15054e8eedb6789 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:59:45 -0400 Subject: [PATCH 19/23] Update and rename ifStatement to ifStatement.cpp --- ifStatement => ifStatement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename ifStatement => ifStatement.cpp (62%) diff --git a/ifStatement b/ifStatement.cpp similarity index 62% rename from ifStatement rename to ifStatement.cpp index 1aa7a24..5df292b 100644 --- a/ifStatement +++ b/ifStatement.cpp @@ -4,9 +4,9 @@ int main() { int a = 3; int b = 4; if(a>b){ - +cout< Date: Wed, 13 Apr 2022 16:01:43 -0400 Subject: [PATCH 20/23] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 11cbe21..95c5dad 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,12 @@ Now we've got four statements within the main function, these are: * Line 5 to give instructions to the user, * Line 6 to read input from the user and * Line 7 to display the user input back to the screen. - +**ifStatement.cpp** +================================================================================================================================================================================ +line 4 and 5 are used tointialize the variable +line 6 checks for the condition if the expression given to if statmenet is true, then the if block will be executed, otherwise +the else block will be executed +Note: +else part doesn't take any condition expression like the 'if' From 1deed0d66ca23e433756e03d101d8a1edb4e58d1 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:02:28 -0400 Subject: [PATCH 21/23] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 95c5dad..aeb85ff 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,10 @@ Now we've got four statements within the main function, these are: * Line 5 to give instructions to the user, * Line 6 to read input from the user and * Line 7 to display the user input back to the screen. + **ifStatement.cpp** ================================================================================================================================================================================ + line 4 and 5 are used tointialize the variable line 6 checks for the condition if the expression given to if statmenet is true, then the if block will be executed, otherwise the else block will be executed From 793ea1288155a3a5f627cc0031fc7e97b9240835 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:04:19 -0400 Subject: [PATCH 22/23] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aeb85ff..55ba129 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,10 @@ Now we've got four statements within the main function, these are: **ifStatement.cpp** ================================================================================================================================================================================ -line 4 and 5 are used tointialize the variable -line 6 checks for the condition if the expression given to if statmenet is true, then the if block will be executed, otherwise -the else block will be executed -Note: -else part doesn't take any condition expression like the 'if' +* Line 4 and 5 are used tointialize the variable +* Line 6 checks for the condition if the expression given to if statmenet is true, then the if block will be executed, +* Otherwise the else block will be executed +* Note: + else part doesn't take any condition expression like the 'if' From 7cd1ef4a506a822bb806f03cba3b0a9b3bcfa795 Mon Sep 17 00:00:00 2001 From: leloteso <47319288+leloteso@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:06:11 -0400 Subject: [PATCH 23/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55ba129..b9a64e6 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Now we've got four statements within the main function, these are: **ifStatement.cpp** ================================================================================================================================================================================ -* Line 4 and 5 are used tointialize the variable +* Line 4 and 5 are used to declear and intialize the variable * Line 6 checks for the condition if the expression given to if statmenet is true, then the if block will be executed, * Otherwise the else block will be executed * Note: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy