Program CellingDown #C++

 Postingan kali ini mengenai C++
aku mencoba berbagi sedikit tentang Celling Down atau program pembulatan kebawah
lihat source code berikut :

#include <cstdlib>
#include <iostream>

using namespace std;
void pembulatan(double x){
     double x,akhir;
     int b;
     b=y;
     akhir=y-b;

 if(akhir>0 && akhir<0.51){cout<<"hasil : "<<c<<endl;}
     else{b=b+1;cout<<" hasil : "<<b;}
     cout<<"hasil : "<<b;
     }

int main(int argc, char *argv[])
{
    double x;
    cin>>x;
    pembulatan(x);
    cout<<endl<<endl;
   system("pause");
                return 0;
}

Runningnya seperti ini...
 

sekian dulu dari aku...simple aja kan postingannya :D

Posted in , , . Bookmark the permalink. RSS feed for this post.

Leave a Reply

Pages

Sandiah Notes Template Sandroid11.blogspot.com.