In this HackerRank Basic Data Types problem in c++, we need to develop a c++ program that can Print each element on a new line in the same order it was received as input.

HackerRank Basic Data Types in c++ problem solution

HackerRank Basic Data Types in c++ problem solution

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

int main() {
    
    int a;
    long b;
    char c;
    float d;
    double e;
    cin >> a >> b >> c >> d >> e;
    cout<< a << '\n' << b << '\n' << c << '\n';
    cout << std::fixed << std::setprecision(3) << d << '\n';
    cout << std::fixed << std::setprecision(9) << e << '\n';
    
    return 0;
}