Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 7th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. // morechar.cpp - typy char versus int
  2. #include <iostream>
  3. int main()
  4. {
  5.     using namespace std;
  6.     char ch = 'M';          // pøiøaï ASCII kód M do ch
  7.     int i = ch;                 // pøiøaï tentýž kód do int
  8.     cout << "The ASCII code for " << ch << " is " << i << endl;
  9.  
  10.     cout << "Ke kodu znaku prictu jednicku:" << endl;
  11.     ch = ch + 1;                // zmìò kód znaku v c
  12.     i = ch;                         // nový znak ulož do i
  13.     cout << "ASCII kod znaku " << ch << " je " << i << endl;
  14.  
  15.     // pouziti clenske funkce cout.put() k vypisu znaku
  16.     cout << "Znak ch vypisuji pomoci cout.put(ch): ";
  17.     cout.put(ch);
  18.  
  19.     // pouziti cout.put() k vypisu znakove konstanty
  20.     cout.put('!');
  21.     cout << endl << "Hotovo" << endl;
  22.     return 0;
  23. }
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