From 5cf233f1907433e86b25f6e317da019bc543ebcd Mon Sep 17 00:00:00 2001 From: Hashir Bin masood <80586637+Hashir313@users.noreply.github.com> Date: Sat, 22 Oct 2022 14:03:27 +0500 Subject: [PATCH] Create Format Specifiers --- C++/Format Specifiers | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 C++/Format Specifiers 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; +}