SHARE
TWEET

Untitled

a guest May 16th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double x = 22.111111111 , y = 3.5555555555555 , w , z;
  9.     cout <<"podaj liczbe rzeczywista: ";
  10.     cin >> w;
  11.     cout <<"\nx = " <<setw(10)<< x <<endl;
  12.     cout <<"\ny = " <<setfill('0') <<setw(12) << y <<endl;
  13.     cout <<"\ny = " <<setprecision(8) <<setfill('0') <<setw(12) << y <<endl;
  14.     cout <<"\nw = " <<setfill('*') <<setw(15) << w <<endl;
  15.     cout <<"\nx + y + w = " <<setprecision(9) << x + y + w <<endl;
  16.     cout <<"\nx * y  = " <<setprecision(8) << x * y <<endl;
  17.     //system("pause");
  18.     return 0;
  19. }
  20. \\\
  21.  
  22.  
  23. #include <iostream>
  24. #include <iomanip>
  25.  
  26. using namespace std;
  27.  
  28. int main()
  29. {
  30.     int k=241;
  31.     cout << "k = " << k << endl;
  32.     cout << "konwersja systemow liczbowych:" << endl;
  33.     cout << "szesnastkowy = " << hex << k << endl;
  34.     cout << "dziesietny = " << dec << k << endl;
  35.     cout << "szesnastkowy = " << setfill ('o') << setw (6) << hex << k << endl;
  36.     cout << "osemkowy = " << setfill ('*') << setw (10) << oct << k << endl;
  37.     //system ("pause") ;
  38.  
  39.     return 0;
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top