Postingan

Menampilkan postingan dari Februari, 2025

Informatics - Making Minimarket Discount Program in C++ version 1 (Week 12)

Gambar
 Happy new year all! 💥 I know it's pretty late but anyways I'm writing my first blog on this year. In this blog I'm going to share my assignment of making a minimarket discount program in C++. There will be two version of this program and here, I'm going to show you the first version. The purpose of this program is to check the total purchase amount against the specified thresholds to determine the applicable discount rate. It will also calculate the final price by subtracting the discount for the total purchase. As a reference to make this program, I was given a similar program.  // program GradeConverter.cpp #include <iostream> #include <iomanip> using namespace std; int main (){ int score; string grade; cout << "Please input numerical score (1-100):"; cin >> score; if(score <= 100){ grade = "A+"; } else if (score >= 80 ){ grade = "A"; } else if (score >= 70 ){ grade = "B"; } else if (scor...