What's new
  • Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

Help C and C++ Need ko tulong nyo

__SaD__

PHC Contributor
Established
Joined
Aug 21, 2017
Messages
87,109
Di makita image mo
 

Megabing213

Enthusiast
Established
Joined
Mar 18, 2018
Messages
113
Parang ganon nadin po. Gusto kolang kase na malipat poyon sa kabila.
Nanghihingi po kasi yung teaxher namen ng example
 

Megabing213

Enthusiast
Established
Joined
Mar 18, 2018
Messages
113
Example po nang while loops and for loops paps. Kahit anong code papo or example
 

treskia

Honorary Poster
Established
Joined
Nov 18, 2017
Messages
874
Haha hirap nyan c++, search ka may command or lib dyan about new column ata
 

Megabing213

Enthusiast
Established
Joined
Mar 18, 2018
Messages
113
Okay naman yun. May idea ka na ng while loop.
Hindi lang maganda pagkakalagay ng code kaya hindi maayos ang output.
Yung output ngapo panget hahaha. Baka may alam po kayo kung pano ilagay yun sa kabila paps?
 

mrHazan

Eternal Poster
Joined
Mar 21, 2016
Messages
1,490
Yung output ngapo panget hahaha. Baka may alam po kayo kung pano ilagay yun sa kabila paps?
Kung gagamitin ko code mo dapat ganito yun.


Code:
#include <iostream>

using namespace std;

int main()
{
    int day = 1;
    int month = 1;
    int year = 2010;
   
    cout << "Day\tMonth\tYear" << endl;
    while(year <= 2018)
    {
        while(month <= 12)
        {
            while(day <= 31)
            {
                cout<< day << "\t" << month << "\t" << year << endl;
                day++;
            }
            day = 1;
            month++;
        }
        month = 1;
        year++;
    }

    return 0;
}
 
Last edited:

Similar threads


Popular On This Forum

New Topics On This Forum

Forum statistics

Threads
567,340
Messages
11,053,733
Members
1,061,879
Latest member
charisse131996
Top