Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <stdlib.h>
- #include <iomanip>
- using namespace std;
- namespace var{
- unsigned int numberPositivo;
- signed int NumberPN;
- long double NumberLong;
- short int NumberShort;
- }
- int main(){
- var::numberPositivo = 100;// Numeros positivos sem sinal;
- var::NumberPN -1;// Numeros negativo e positivos com sinal;
- var::NumberLong = 78048.45;// Valores longos;
- var::NumberShort = 100; // Valores curtos;
- using namespace var;
- cout<<"NumberPositivo = "<<numberPositivo<<endl;
- cout<<"NumberPN = "<< std::setprecision(8) << NumberPN<<endl;
- cout<<"NumberLong = "<<NumberLong<<endl;
- cout<<"NumberShort = "<<NumberShort<<endl;
- float f = 5.6;
- cout<<"Testando o STDFIXED = "<<std::fixed<<f<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement