loading...

C++ :: Menentukan Jumlah Hari Dalam Bulan Dan Tahun Tertentu

Script berikut akan menampilkan jumlah hari dalam bulan dan tahun tertentu sesuai dengan bulan dan tahun yang diminta.
Script ini menggunakan Array 1 Dimensi dan statemen if else.

//program jumlah hari
#include<iostream.h>
#include<conio.h>
void main()
{
int Jml_Hari[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int Bulan, Tahun, J_Hari;
clrscr();
cout<<“Bulan ke [1…12] = “; cin>>Bulan;
cout<<“Tahun             = “; cin>>Tahun;
if (Bulan == 2)
{
if ((Tahun % 4 == 0) && (Tahun % 100 == 0))
{
J_Hari = 29;
cout<<“Tahun Kabisat”<<endl;
}
else
{
J_Hari = 28;
cout<<“Tahun Biasa”<<endl;
}
}
else
{
J_Hari = Jml_Hari[Bulan];
}
cout<<“Bulan ke-“<<Bulan; cout<<” Tahun “<<Tahun<<endl;
cout<<“Jumlah Hari ==> “<<J_Hari<<” hari”;
}

16 Responses to C++ :: Menentukan Jumlah Hari Dalam Bulan Dan Tahun Tertentu

  1. … [Trackback]

    […] Find More here|Find More|Read More Informations here|Here you can find 57368 more Informations|Infos on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  2. … [Trackback]

    […] Read More here|Read More|Find More Infos here|Here you can find 60909 additional Infos|Informations on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  3. insulation says:

    … [Trackback]

    […] Find More on|Find More|Find More Infos here|There you will find 81198 more Infos|Infos on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  4. iraqi Laws says:

    … [Trackback]

    […] Read More on|Read More|Find More Infos here|Here you will find 84222 additional Infos|Informations on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  5. ADME says:

    … [Trackback]

    […] Find More on|Find More|Read More Infos here|There you will find 85140 additional Infos|Informations on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  6. … [Trackback]

    […] Read More on|Read More|Find More Informations here|There you can find 44213 more Informations|Infos to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  7. image source says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you will find 74895 additional Informations|Informations on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  8. … [Trackback]

    […] Find More here|Find More|Find More Infos here|Here you can find 8028 more Infos|Infos to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  9. … [Trackback]

    […] Find More on|Find More|Read More Infos here|There you can find 74139 additional Infos|Informations on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  10. allenskate says:

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|Here you will find 6585 additional Informations|Informations to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  11. … [Trackback]

    […] Find More here|Find More|Find More Informations here|There you will find 34229 more Informations|Infos to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  12. … [Trackback]

    […] Read More here|Read More|Read More Informations here|Here you will find 72914 more Informations|Infos on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  13. wepad says:

    … [Trackback]

    […] Read More here|Read More|Find More Infos here|There you will find 11284 more Infos|Informations to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  14. … [Trackback]

    […] Read More here|Read More|Read More Infos here|There you can find 15105 more Infos|Informations to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  15. … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you can find 48070 additional Informations|Informations to that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

  16. … [Trackback]

    […] Find More here|Find More|Read More Infos here|Here you can find 83704 more Infos|Infos on that Topic: blog.loksado.com/c-menentukan-jumlah-hari-dalam-bulan-dan-tahun-tertentu […]

Mari berdiskusi dengan santun...