Advertisement
mydiaz

Berapa hari projek ini selesai

Sep 3rd, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n,thn,bln,hari;
  6.    
  7.     cout << "Input berapa hari projek tersebut dikerjakan : ";
  8.     cin >> n;
  9.    
  10.     thn = (n/365);
  11.     bln = (n-(thn*365))/30;
  12.     hari = (n-(thn*365))-(bln*30);
  13.    
  14.    
  15.     cout << endl << "Projek Dikerjakan Selama = " << thn << " tahun "
  16.     << bln << " bulan " << hari << " hari";
  17.    
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement