C++16th Code (Variables in C++)

#include<iostream>
using namespace std;
int main()
{
int a ;
float b;
double c;
long double d;
char e;
string f=”Welcome in C++ Variables ” ;
bool x ;
cout<<“\n”;
cout<<” Enter integer number a : “;
cin>>…


This content originally appeared on DEV Community and was authored by Mohammed Salah

    #include<iostream>
    using namespace std; 
    int main()
    {
int a ; 
float b;
double c; 
long double d; 
char e; 
string f="Welcome in C++ Variables " ;
bool x ; 
cout<<"\n";
cout<<" Enter integer number a : "; 
cin>>a; 
    cout<<"\n\n\t****************************************\n\n";
cout<<"Enter float number b : ";
cin>>b; 
    cout<<"\n\n\t****************************************\n\n";
cout<<"Enter double number c : ";
cin>>c;
    cout<<"\n\n\t****************************************\n\n";
cout<<"Enter long double number d : "; 
cin>>d; 
    cout<<"\n\n\t****************************************\n\n";
cout<<" Enter a letter in Variable e --> "; 
cin>>e;
    cout<<"\n\n\t****************************************\n\n";
cout<<" Enter  Zero Or one --> " ; 
cin>>x;
    cout<<"\n\n\t****************************************\n\n";
cout<<"\n\n\n\t\t";
cout<<f<<endl; 
cout<<"\n\n\n\t\t";
cout<<"\n\t you have enter  a,b c ,d ,e ,f,x = \n\n";
cout<<"\n\n\n\t\t";
cout<<a<<endl;
cout<<"\n\n\n\t\t";
cout<<b<<endl;
cout<<"\n\n\n\t\t";
cout<<c<<endl;
cout<<"\n\n\n\t\t";
cout<<d<<endl; 
cout<<"\n\n\n\t\t";
cout<<e<<endl;
    cout<<"\n\n\n\t\t";
if(x>0)
{
cout<<"True = "<<x<<endl;
}
else
{
cout<<"False = "<<x<<endl;
}
cout<<"\n\n\n\t\t";
    cout<<"\n\n\n\t\t";
cin.get();
cout<<"\n\n\n\t\t";
system("pause");
cout<<"\n\n\n\t\t";
return 0;
    }


This content originally appeared on DEV Community and was authored by Mohammed Salah


Print Share Comment Cite Upload Translate Updates
APA

Mohammed Salah | Sciencx (2025-01-24T19:27:57+00:00) C++16th Code (Variables in C++). Retrieved from https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/

MLA
" » C++16th Code (Variables in C++)." Mohammed Salah | Sciencx - Friday January 24, 2025, https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/
HARVARD
Mohammed Salah | Sciencx Friday January 24, 2025 » C++16th Code (Variables in C++)., viewed ,<https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/>
VANCOUVER
Mohammed Salah | Sciencx - » C++16th Code (Variables in C++). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/
CHICAGO
" » C++16th Code (Variables in C++)." Mohammed Salah | Sciencx - Accessed . https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/
IEEE
" » C++16th Code (Variables in C++)." Mohammed Salah | Sciencx [Online]. Available: https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/. [Accessed: ]
rf:citation
» C++16th Code (Variables in C++) | Mohammed Salah | Sciencx | https://www.scien.cx/2025/01/24/c16th-code-variables-in-c/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.