can any one explain how to display a five digit number in c++

Recommended Answers

All 3 Replies

use cout

int x = 12345;
cout << x;
commented: Sounds like a plan :) +11
#include <iostream>
using namespace std ;
main () 
{ 
        int a,b,c,d,e,f ;
       cout << "Please Enter Five Digits :" ;
       cin >> a >> b >> c >> d >> e >> f ;
       cout << a << b << c << d << e << f ;

}

can any one explain how to display a five digit number in c++

Do you want leading zeroes?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.