Breaking News

Laman

Selasa, 03 April 2012

Modul II THE BASICS OF C / C + +

This is the temperature conversion program, simple to implement basic - basic C + +.
I hope this program can help.
#include <iostream.h>
#include <conio.h>
void main()
{
int hari, bulan, tahun, minggu, sisahari;

cout<<"=========================================="<<endl;
cout<<"===       PROGRAM KONVERSI WAKTU       ==="<<endl;
cout<<"===      Muhammad Faiz Firmansyah      ==="<<endl;
cout<<"===            110533430657            ==="<<endl;
cout<<"=========================================="<<endl;
cout<<"Masukkan Jumlah Hari yang Anda Ingin Konversikan : ";
cin>>hari;
cout<<endl<<"======================================"<<endl;
tahun = hari/360;
cout<<endl<<hari<<" Dapat Dikonversikan Menjadi : "<<endl<<tahun<<" Tahun,";
bulan = (hari-(tahun*360))/30;
cout<<endl<<bulan<<" Bulan,";
minggu = (hari-(tahun*360)-(bulan*30))/7;
cout<<endl<<minggu<<" Minggu, dan";
sisahari = hari-(tahun*360)-(bulan*30)-(minggu*7);
cout<<endl<<sisahari<<" Hari"<<endl;
getch ();
}

Tidak ada komentar:

Designed By