Tuesday, 20 September 2016

Using int, long, long long, char, float , double data types in C++

#include <iostream>
#include <cstdio>
using namespace std;

int main() {

    int i;
    long l;
    long long ll;
    char c;
    float f;
    double d;
    cin>>i>>l>>ll>>c>>f>>d;
    cout<<i<<"\n"<<l<<"\n"<<ll<<"\n"<<c<<"\n"<<f<<"\n"<<d;
    return 0;
}

No comments:

Post a Comment