Posts

Showing posts from October, 2024

Day 17

Hi Today we’re going to learn: C++ Tutorial Learn C++ C++ is a popular programming language. C++ is used to create computer programs, and is one of the most used language in game development. C++ was developed as an extension of  C , and both languages have almost the same syntax. Examples in Each Chapter Our "Try it Yourself" editor makes it easy to learn C++. You can edit C++ code and view the result in your browser. Example #include <iostream> using namespace std; int  main() {   cout <<  "Hello World!" ;    return   0 ; }

Day 16

C Format Specifiers Format Specifiers Format specifiers are used together with the  printf()  function to tell the compiler what type of data the variable is storing. It is basically a  placeholder  for the variable value. A format specifier starts with a percentage sign  % , followed by a character. For example, to output the value of an  int variable, use the format specifier  %d  surrounded by double quotes ( "" ), inside the  printf() function: Example int  myNum =  15 ; printf( "%d" , myNum);   // Outputs 15  To print other types, use  %c  for  char  and  %f for  float : Example // Create variables int  myNum =  15 ;             // Integer (whole number) float  myFloatNum =  5.99 ;    // Floating point number char  myLetter =  'D' ;        /...

Day 15

C Declare Multiple Variables Declare Multiple Variables To declare more than one variable of the same type, use a  comma-separated  list: Example int  x =  5 , y =  6 , z =  50 ; printf( "%d" , x + y + z);  You can also assign the  same value  to multiple variables of the same type: Example int  x, y, z; x = y = z =  50 ; printf( "%d" , x + y + z);  And this was for today Thanks

Day 14

C Variable Change Variable Values If you assign a new value to an existing variable, it will  overwrite  the previous value: Example int  myNum =  15 ;   // myNum is 15 myNum =  10 ;   // Now myNum is 10  You can also assign the value of one variable to another: Example int  myNum =  15 ; int  myOtherNum =  23 ; // Assign the value of myOtherNum (23) to myNum myNum = myOtherNum; // myNum is now 23, instead of 15 printf( "%d" , myNum);  Example // Create a variable and assign the value 15 to it int  myNum =  15 ; // Declare a variable without assigning it a value int  myOtherNum; // Assign the value of myNum to myOtherNum myOtherNum = myNum; // myOtherNum now has 15 as a value printf( "%d" , myOtherNum);

Day 13: ”C multi lines”

Let’s continue learning more information about c, and today’s information is how to write a multi_line comments C Multi-line Comments Multi-line comments start with  /*  and ends with  */ . Any text between  /*  and  */  will be ignored by the compiler: Example /* The code below will print the words Hello World! to the screen, and it is amazing */ printf( "Hello World!" );  Single or multi-line comments? It is up to you which you want to use. Normally, we use  //  for short comments, and  /* */  for longer. Good to know:  Before version  C99  (released in 1999), you could only use multi-line comments in C.

Day 12 “C comments”

Comments in C Comments can be used to explain code, and to make it more readable. It can also be used to prevent execution when testing alternative code. Comments can be  singled-lined  or  multi-lined . Single-line Comments Single-line comments start with two forward slashes ( // ). Any text between  //  and the end of the line is ignored by the compiler (will not be executed). This example uses a single-line comment before a line of code: Example // This is a comment printf( "Hello World!" ); 

Day 11💻

today we’re going to learn: ( c statements, c new lines ) C Statements A  computer program  is a list of "instructions" to be "executed" by a computer. In a programming language, these programming instructions are called  statements .  The following statement "instructs" the compiler to print the text "Hello World" to the screen: Example printf( "Hello World!" ); C New Lines To insert a new line, you can use the  \n character: Example #include <stdio.h> int  main() {  printf( "Hello World! \n " );   printf( "I am learning C." );    return   0 ; }  You can also output multiple lines with a single  printf()  function. However, this could make the code harder to read: Example #include <stdio.h> int  main() {  printf( "Hello World! \n I am learning C. \n And it is awesome!" );    return   0 ; }  Tip:  Two  \n  characters after each other will create a blank lin...

Day 10

Syntax You have already seen the following code a couple of times in the first chapters. Let's break it down to understand it better: Example #include <stdio.h> int  main() {  printf( "Hello World!" );    return   0 ; }  Example explained Line 1:   #include <stdio.h>  is a  header file library  that lets us work with input and output functions, such as  printf()  (used in line 4). Header files add functionality to C programs. Don't worry if you don't understand how   #include <stdio.h>  works. Just think of it as something that (almost) always appears in your program. Line 2:  A blank line. C ignores white space. But we use it to make the code more readable. Line 3:  Another thing that always appear in a C program is  main() . This is called a  function . Any code inside its curly brackets  {}  will be executed. Line 4:   printf()  is a  function ...

Day 9💻

Image
C Quickstart Let's create our first C file. Open Codeblocks and go to  File > New > Empty File . Write the following C code and save the file as  myfirstprogram.c  ( File > Save File as ): myfirstprogram.c #include <stdio.h> int  main() {  printf( "Hello World!" );    return   0 ; }  Don't worry if you don't understand the code above - we will discuss it in detail in later chapters. For now, focus on how to run the code. In Codeblocks, it should look like this: Then, go to  Build > Build and Run  to run (execute) the program. The result will look something to this: Hello World! Process returned 0 (0x0) execution time : 0.011 s Press any key to continue. Congratulations ! You have now written and executed your first C program. Learning C At W3Schools When learning C at W3Schools.com, you can use our "Try it Yourself" tool, which shows both the code and the result. It is used to write, run, and test code right in you...

Day 8 {C language}

Image
  Get Started With C To start using C, you need two things: A text editor, like Notepad, to write C code A compiler, like GCC, to translate the C code into a language that the computer will understand There are many text editors and compilers to choose from. In this tutorial, we will use an  IDE  (see below). C Install IDE An IDE (Integrated Development Environment) is used to edit AND compile the code. Popular IDE's include Code::Blocks, Eclipse, and Visual Studio. These are all free, and they can be used to both edit and debug C code. Note:  Web-based IDE's can work as well, but functionality is limited. We will use  Code::Blocks  in our tutorial, which we believe is a good place to start. You can find the latest version of Codeblocks at  http://www.codeblocks.org/ . Download the  mingw-setup.exe  file, which will install the text editor with a compiler. 

Day 7 💻

Image
Let’s continue learning programming languages And know each language’s tutorial ,Today’s language is C What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. The main reason for its popularity is because it is a fundamental language in the field of computer science. C is strongly associated with UNIX, as it was developed to write the UNIX operating system. Why Learn C? It is one of the most popular programming languages in the world If you know C, you will have no problem learning other popular programming languages such as Java, Python, C++, C#, etc, as the syntax is similar C is very fast, compared to other programming languages, like  Java  and  Python C is very versatile; it can be used in both applications and technologies Difference between C and C++ C++  was developed as an extension of C, and both languages have almost the same syntax The main differe...

Day 6 💻

Today i am talking about: External JavaScript Scripts can also be placed in external files: External file: myScript.js function  myFunction() {  document.getElementById( "demo" ).innerHTML =  "Paragraph changed." ; } External scripts are practical when the same code is used in many different web pages.  JavaScript files have the file extension  .js . To use an external script, put the name of the script file in the  src  (source) attribute of a  <script>  tag: Example < script  src ="myScript.js">< /script >

Day 5💻

Image
Hi 👋 This Day I’m going to tal about Javascript syntax JavaScript syntax is the set of rules, how JavaScript programs are constructed: // How to create variables: var  x; let  y; // How to use variables: x =  5 ; y =  6 ; let  z = x + y; And this is for today

Day 4 at programming information

Image
Today’s topic is Javascript Statement I will give you some hints about how to create a Statement using this programming language <html> <body> <h2>JavaScript Statements</h2> <p>A <b>JavaScript program</b> is a list of <b>statements</b> to be executed by a computer.</p> <p id="demo"></p> <script> var x, y, z; // Declare 3 variables x = 5; // Assign the value 5 to x y = 6; // Assign the value 6 to y z = x + y; // Assign the sum of x and y to z document.getElementById("demo").innerHTML = "The value of z is " + z + "."; </script> </body> </html> I hope it’s helpful for you🥰

Day 3’s topic (JAVASCRIPT)

Image
 Today’s topic is Javascript  language   JavaScript is one of the most popular programming language. JavaScript is the programming language of the Web. JavaScript is easy to learn. This tutorial will teach you JavaScript from basic to advanced. JavaScript Can Change HTML Content One of many JavaScript HTML methods is  getElementById() . The example below "finds" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript":

Day 2 Talking about computer science 💻

Image
 Today’s Information about computer science is one of the most important points that is related to this topic And this point is programme language  There is many programme languages such as Python language   This language is more common than the other languages as  it’s used in many fields and it enable us to create websites, games and applications. Also there is other languages like:  C C++ C# Javascript And we wll get into more details about them in the next blogs♥️

Introduction to computer science

Image
 Hi. My name is Nadine and at this blog i’m talking about computer science, Info. system and syber security  Computer science  is the study of  computation ,  information , and  automation . Computer science spans  theoretical disciplines  (such as  algorithms ,  theory of computation , and  information theory ) to  applied disciplines  (including the design and implementation of  hardware  and  software ). Computer science is one of the biggest fields that we can talk about  At the next blogs i’m going to discuss more points about this topic and what i learned about CS. from my college and courses in detail