You are viewing a single comment's thread. Return to all comments →
I used scanf and printf and it worked like this
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { // Declare variables int a; long b; char c; float d; double e; // Take input scanf("%d %ld %c %f %lf", &a, &b, &c, &d, &e); // Output it printf("%d\n%ld\n%c\n%.3f\n%.9lf", a, b, c, d, e); 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 →
I used scanf and printf and it worked like this