C++ codes for counting saving according to the number of days

Say you need to save RM according to the number of day in a year.

Day 1 in Jan =RM1
Day 2 in Jan =RM2

Day 365 in Dec = RM365

which is quite impossible at the end of the year.. because it's freaking a lot.

Anyway a friend want to count that hence I wrote my simple C++ program;

using namespace std;
int main()
int sum;
for (int i=1;i<=365;i++)
cout<<"Sum is "<return 0;

That's all.


Popular posts from this blog

Review Huawei Nova 2i, fon dual-camera terbaik pada harga yang berbaloi

Panduan Bas Ekspres Kuala Lumpur (TBS) - Skudai