You are viewing a single comment's thread. Return to all comments →
Little counterintuitive, but works none the less. Simple, easily understandable code you can use (no credit)
#include <iostream> #include <cstdio> using namespace std; int main() { int a; long b; char c; float d; double e; scanf("%d %ld %c %f %lf", &a, &b, &c, &d, &e); printf("%d", a); cout << endl; printf("%ld", b); cout << endl; printf("%c", c); cout << endl; printf("%f", d); cout << endl; printf("%lf", e); cout << endl; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Basic Data Types
You are viewing a single comment's thread. Return to all comments →
Little counterintuitive, but works none the less. Simple, easily understandable code you can use (no credit)