Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-24-2013, 06:42 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › C / C++ v
« Previous 1 ... 3 4 5 6 7 ... 15 Next »

campuran part 4

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
campuran part 4
07-03-2012, 03:38 PM
Post: #1
genta Online
soutboxer
Posts: 967
Joined: Jan 2012
Reputation: 67
campuran part 4
asalmualikum Wr.Wb cuteboy.....................salam logodc

ketemu lg ne ama ane newbie yg suram ini........... ijin tuk buat thread lg karana dah lmayan lma gak bikin thread lg ngakak ...ini bekas belajar tadi lngsung dah jngan banytak komat kamit smangat

1.manipulator flush

Code:
#include <fstream>
#include <conio.h>

using namespace std;

int main()
{
    ofstream outfile ("bufer.txt");
    for (int n=0;n<100; n++)
    outfile<<n<<flush;
    system("PAUSE");
    return 0;
}

Quote:program flush mencetak ke dalam bufer yaitu bilangan dari o sampai dengan 49

2.manifulator hex,dec,oct

Code:
#include <iostream>
#include <conio.h>

using namespace std;
int main()
{
    int dc;
    cout<<"masukan nilai     :";
    cin>>dc;
    cout<<"bilangan decimal     :"<<dc<<"\n";
    cout<<"bilangan hexadecimal :"<<hex<<dc<<"\n";
    cout<<"bilangan octal       :"<<oct<<dc<<"\n";
    getch();
}

Quote:merupakan manipulator yang berfungsi untuk menampilkan data kedalam bentuk decimal yang berarti bilangan basis 10, hexa yang berarti bilangan
basis 16 dan octal bilangan basis 8

3.manifulator setbase

Code:
#include <iostream>
#include <conio.h>
#include <iomanip.h>

using namespace std;
int main()
{
    int x=0;
    cout<<"---manifulator setbase (n)---\n\n";
    cout<<"   dec(10) - oct (8) - hex (16)\n";
    cout<<"*********************************";
    for (x=0; x<=17; x++)
    {
        cout<<setw(7);
        cout<<setbase(10)<<x<<setw(9);
        cout<<setbase(8)<<x<<setw (9);
        cout<<setbase(16)<<x<<endl;
        }
        getch();
        }

Quote:merupakan suatu fungsi manifulator yang di gunakan untuk melakukan konversi bilangan berbasis n .bilangan berbasis n dapat juga
di ibaratkan bilangan hexa,decimal.octal

4.manipulator setfill

Code:
#include <iostream>
#include <conio.h>
#include <iomanip.h>

using namespace std;
int main()
{
    int x = 0;
    cout<<"****Manifulator setfill(c)****\n\n";
    for (x=1;x<=9;x++)
    {
        cout<<setfill('+');
        cout<<setw(x)<<x<<endl;
        }
        getch();
        }

Quote:manipilator setfill di gunakan untuk menampilkan suatu karakter c didepan nilai yang sebelumnya telah di atur oleh fungsi setw

5. manipulator setiosflags

Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    float a,b,c;
    cout<<"rapat kiri dengan setiosflags(ios::left)\n";
    cout<<"input nilai A     :";
    cin>>a;
    cout<<"input nilai B     :";
    cin>>b;
    c = a*b;
    cout<<"hasil = ";
    cout<<setiosflags (ios::left)<<setw(10)<<c<<endl;
    getch();
}

Quote:berfungsi untuk mengatur output data dengan format terttentu

6. manifulator setw
Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    int x=0;
    cout<<"****Manifulator Setw(n)****\n\n";
    for (x=1;x<=9;x++)
    {
        cout<<setw(x)<<x<<endl;
        }
        getch();
        }

Quote:manifulator setw(n) berfungsi untuk mengatur lebar tampilan di layar

7. program ioscientific

Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    float x;
    cout<<"penggunaan setiosflags (ios::scientific)\n";
    cout<<"masukan nilai x =";
    cin>>x;
    cout<<"hasil setiosflags (ios::scientific) dari nilai x = ";
    cout<<setiosflags(ios::scientific)<<x<<endl;
    getch();
}

Quote:setiosflags (ios::scientific) di gunakan untuk mengatur output dlam bentuk scientific arau notasi eksponsial

8. program iosfixed

Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    float x;
    cout<<"penggunaan setiosflags (ios::fixed)\n";
    cout<<"input nilai x          :";
    cin>>x;
    cout<<"hasil setiosflags(ios::fixed) dari nilai x =";
    cout<<setiosflags(ios::fixed)<<x<<endl;
    getch();
}

Quote:setiosflags(ios::fixed) di gunakan untuk mengatur output dalam bentuk fixed point notasi desimal

9.program ioshex

Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    int x ;
    cout<<resetiosflags(ios::dec);
    cout<<"penggunaan setiosflags (ios::hex)\n";
    cout<<"masukan nilai x =";
    cin>>x;
    cout<<"hasil setiosflags (ios::hex)dari nilai x =";
    cout<<setiosflags(ios::hex)<<x<<endl;
    getch();
}

Quote:etiosflags (ios::hex) di gunakan untuk menampilkan kedalam bentuk hexadecimal

10.program setisflags

Code:
#include <iostream>
#include <conio.h>
#include <iomanip>

using namespace std;
int main()
{
    float a,b,c;
    cout<<"rapat kiri dengan setiosflags(ios::right)\n";
    cout<<"input nilai A     :";
    cin>>a;
    cout<<"input nilai B     :";
    cin>>b;
    c = a*b;
    cout<<"hasil = ";
    cout<<setiosflags (ios::right)<<setw(10)<<c<<endl;
    getch();
}

Quote:berfungsi untuk mengatur output data dengan format terttentu , yang ini mengambil dr kanan

maaf thready ngaco ngakak ......bila hnaya menjadi sampah belaka silahkan di apus pasrah ........cukup sekian untuk kali ini

wasalmualaikum Wr.Wb mohon
Find all posts by this user
Quote this message in a reply
07-03-2012, 03:41 PM
Post: #2
Tuban Offline
./Devilz Officer
Posts: 81
Joined: Feb 2012
Reputation: 2
RE: campuran part 4
Wuih om bikin threat mimisan,numpang belajar bang gen belajar
Find all posts by this user
Quote this message in a reply
07-03-2012, 03:41 PM
Post: #3
pupkucing Away
Banned
Posts: 6
Joined: Jul 2012
RE: campuran part 4
apaan nih ? garing
gue gak ngerti sama sekali ngakak
Visit this user's website Find all posts by this user
Quote this message in a reply
07-03-2012, 03:45 PM
Post: #4
ubuntux Offline
./Admiral of Devilzc0der
Posts: 1,625
Joined: Dec 2011
Reputation: 75
RE: campuran part 4
mantap om genta threadnya
ane blm bsa C++ hmm
Visit this user's website Find all posts by this user
Quote this message in a reply
07-03-2012, 03:47 PM (This post was last modified: 07-03-2012 03:47 PM by genta.)
Post: #5
genta Online
soutboxer
Posts: 967
Joined: Jan 2012
Reputation: 67
RE: campuran part 4
(07-03-2012 03:41 PM)Tuban Wrote:  Wuih om bikin threat mimisan,numpang belajar bang gen belajar
silahkan om
Find all posts by this user
Quote this message in a reply
07-03-2012, 03:48 PM
Post: #6
KEi Offline
./Devilz Officer
Posts: 160
Joined: Jun 2012
Reputation: 3
RE: campuran part 4
(07-03-2012 03:47 PM)genta Wrote:  
(07-03-2012 03:41 PM)Tuban Wrote:  Wuih om bikin threat mimisan,numpang belajar bang gen belajar
silahkan om

gentak maho ngakak
Visit this user's website Find all posts by this user
Quote this message in a reply
07-03-2012, 03:49 PM (This post was last modified: 07-03-2012 03:50 PM by genta.)
Post: #7
genta Online
soutboxer
Posts: 967
Joined: Jan 2012
Reputation: 67
RE: campuran part 4
(07-03-2012 03:45 PM)ubuntux Wrote:  mantap om genta threadnya
ane blm bsa C++ hmm
ane juga sampe sekrang belum ngerti2 om pasrah
(07-03-2012 03:41 PM)pupkucing Wrote:  apaan nih ? garing
gue gak ngerti sama sekali ngakak
bused dah malah ngomong maho lg nohope
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  campuran part 5 genta 9 391 09-16-2012 02:30 PM
Last Post: oktori yusan
  path to localroot exploit part 2 syn_attack 9 832 08-11-2012 12:18 AM
Last Post: pistol-air
  campuran part 3 genta 11 545 06-06-2012 03:59 PM
Last Post: genta
  [Tutor] campuran part 2 genta 17 1,081 05-13-2012 07:36 PM
Last Post: genta
Thumbs Down campuran genta 10 645 03-31-2012 08:16 PM
Last Post: genta
  c for Geek - part 2 ev1lut10n 10 862 01-15-2012 02:28 AM
Last Post: apiep
  path to localroot exploit part I syn_attack 11 1,141 12-17-2011 09:38 PM
Last Post: syn_attack
  ioctl on device - part 1 ev1lut10n 1 286 11-25-2011 01:41 PM
Last Post: ketek
  2.6x LKM - part 1 ev1lut10n 1 623 09-14-2011 04:04 PM
Last Post: schumbag
  Penggunaan GDB (part 2) mywisdom 3 890 01-22-2011 03:15 PM
Last Post: zer03s

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-24-2013, 06:42 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE