diff --git a/C++/Format Specifiers b/C++/Format Specifiers new file mode 100644 index 0000000..f0bec35 --- /dev/null +++ b/C++/Format Specifiers @@ -0,0 +1,19 @@ +#include +#include +using namespace std; + +int main() { + int i; + long l; + char ch; + float fl; + double d; + cout<<"Enter the values in INT, LONG, CHARACTER, FLOAT and DOUBLE : "; + cin>>i>>l>>ch>>fl>>d; + printf("%d\n",i); + printf("%ld\n",l); + printf("%c\n",ch); + printf("%.3f\n",fl); + printf("%.9lf\n",d); + return 0; +}