Answer to Question #174157 in C++ for V.Karthickraja

Question #174157

The fill character is set to sign “#”. The set() properties are set to internal and scientific. The scientific properties display the number in float format. The internal properties display the sign before blank spaces. Develop a C++ program to implement it. # # # - 7 8 4 . 5 0


1
Expert's answer
2021-03-22T08:22:12-0400
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    float a=-784.50;
    cout<<setfill('#')<<setw(10);
    cout<<fixed<<setprecision(2)<<a<<endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS