Postingan

Menampilkan postingan dari Oktober, 2024

Informatics - Decimal Formatting Program (week 7)

Gambar
Hi everyone, here we go again with informatics c++ program. This block is actually still related with the previous block. So, I recommend you read my previous  blog  first.  As you can see there, the result of the calculation is quite confusing right? There's no such proper dots or coma to separate the numbers. Here, with this code program in c++, we can format the decimal and also make the numbers readable and tidier. I use code blocks to compile and run the program. Attach is the syntax of the program: Line 1: provides access to the std::locale class and related functionality, which allows us to handle locale-specific settings such as number formatting. Line 2: allows the use of standard input/output streams, including std::cout for output. Line 3: provides functions for manipulating input and output streams, such as setting precision and formatting. Line 5: defines a new class comma_numpunct, which inherits from std::numpunct<char>. std::numpunct is a c...

Informatics - Compiling Program - Compile and Run the Program Using Command Prompt (week 6)

Gambar
Hello everyone! Finally, after a lot of drama installing the compiler, I can compile and run my program. I compile and run my program by using Command Prompt. In this blog I would like to share to you about how to compile and run the program by using Command Prompt. A Command Prompt is basically a Command Line Interface. It is an application in which the user enters commands, and the operations are executed accordingly. The Command Prompt is an integral part of the Windows Operating System.  As I stated in the previous blog, the program is in the c++ programming language, and the result is to calculate simple rate interest and compound rate interest.  So here are the steps to compile and run the program in Command Prompt.  Step 1:  Open the file storage and where you save the file. Here, I save my file on the documents. Then double click the folder.  Step 2:  Choose the zip file and then right click the file and press the "Open in Terminal" option...

Informatics - Compiling Program - Downloading the MinGW by Following a Website Tutorial (week 5)

Gambar
Hi y'all, here we go again to the week 5. In this blog I would like share of how to install MinGW in windows 11. If you read my previous blog, there was something wrong when I was installing the compiler. Here, I'm trying to install MinGW by following a  website  tutorial.  The first step  we need to do is going to the  MinGW  website then click  download .  Second step.  After finish download, click  open file  then click  install.   Third step.  After finishing installing, click  continue  then MinGW installation manager will appear. Fourth step.  In the installation manager,  right-click  on  each  option and then  click Mark for Installation . In the Installation options, click  Apply changes . Then select  Apply . All files will start downloading. This process will take 5-6 minutes. When  finished , click  Close . How to Change Environment Variables for ...

Informatics - Compiling C++ Program - Try to Download the MinGW by Watching Youtube Tutorial (week 4)

Gambar
Hi everyone, in this blog I will share my experience of how compiling c++ program in windows. This is my informatics school project.  The result of the program is I can calculate simple rate interest and compound rate interest. In the first week I'm trying to compile it in the visual studio code, but unfortunately my step is wrong, so the program is error. it stated that there is no such file in my directory. Which means my computer have no idea about the program.  In windows, to compile the c++ program we need to have MinGW as a compiler and insert it to our computer environment. And at that time, I didn't have it. So, I decided to download the MinGW first. To download it I open the YouTube and search of how installing the MinGW compiler in windows.  I was following this  YouTube  tutorial to install MinGW to build C++ code So, from this video the first step you need to do is download the latest installer from the  MSYS2  page. After successfully...

Informatics - Extracting Locked Picture from Instagram (week 3)

Gambar
Hey everyone! Meet me again with another blogpost. This post is going to be so fun because I'm sure y'all have ever considered this. Have you ever wondering of how to download a picture from Instagram? I'm sure y'all have tried to use like some apps to download the picture by copying the link address of the picture. And sometimes you even cannot save the pictures because the account is private right? Well, you can actually save those pictures without the apps, and it's definitely will work. So, if you curious of how to do it, just read this blog and follow the step, good luck!  Step 1:  Find an Instagram post that you want to extract. Here I'm taking a beautiful picture of a moon from Nasa Instagram account.  Step 2:  Right click the picture and choose the inspect option. Then you will straight go to the inspection window.  Step 3:  Read carefully the list of the class. You will see the highlighted line followed by 3 dots. When you move your cursor to that,...

Informatics - Deconstructing & Constructing loop functions (week 2)

Gambar
Hi everyone! Just like I told you in the previous blog, I was assigned to make a triangle shape using loop function. Here, in this blog I will share my journey of modifying the code that my teacher gave to me so that I can make the triangle shape. My final output display should make a triangle by using a 'A' sign. in the first line there will be an 'A' in the middle and it will increase until shaped a triangle.   I try to modify it by changing some of the things in the code but turns out weird. It doesn't look like triangle, the 'A' sign is increasing but it's going to the right side and not going down. Here's the code and the output:  I don't really know what is actually going wrong with my code. I decided to modify anything from my previous code and change everything I know. But still the result is not triangle. It is increasing 1 asterisk going down, but the space is not fit.  Here's the code and the result of the code: Again, I'm tryi...

Informatics - Deconstructing & Constructing loop functions (week 1)

Gambar
Hello everyone! Welcome to my first blog post. I will talk about coding, some tricks and anything about informatics from my informatics class at my school. In this first blog post I will share about what I'm doing in my informatics class which is deconstructing and constructing loop function. At the beginning of the class I was given a code of loop functions. Then I assigned to make a triangle shape by using loop.  Here is the code that was given to me: (1) #include <iostream> using namespace std; (2) int main (){ (3)    for (int i = 1; i <= 5; i++){ (4)        for (int j = 1; j <= i; j++){ (5)            cout << "*"; (6)        } (7)        cout << std :: endl; (8)    } (9)    return 0; (10) } The first step I took is I d...