Output ASCII value of character

前端 未结 4 1004
一整个雨季
一整个雨季 2020-12-20 10:39
#include 

using namespace std;

int main()
{
    char x;
    cout << \"enter a character:\";
    cin >> x;
    cout << \"ASCII Val         


        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 11:24

    #include 
    
    using namespace std;
    
    int main()
    {
        char x;
        cout<< "enter a character:";
        cin>>x;
        cout<< "ASCII Value of "<< x<< "is"<< char(x);
    return 0 ;
    }
    

    try this its called return

提交回复
热议问题