Jambix64

static_cast11

Jul 14th, 2016
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1.  /*Convertendo caracters para Decimal ASCII ultilizando static_cast */
  2.  #include <iostream>
  3.  #include <stdlib.h>
  4.  #include <stdio.h>
  5.  #include  <windows.h>
  6.  using namespace std;
  7.  
  8. int main(){
  9.  
  10.     char letra;
  11.     cout<<"Digite um caracter,para saber o valor do caracter em ASCII"<<endl;
  12.     cin>>letra;
  13.     cout<< static_cast <int>(letra)<<endl;
  14.   return 0;
  15. }
Add Comment
Please, Sign In to add comment