DEV Community

Mohammed Salah
Mohammed Salah

Posted on

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>>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;
    }
Enter fullscreen mode Exit fullscreen mode
👋 Take one minute to check this out

Tired of spending so much on your side projects? 😒

We have created a membership program that helps cap your costs so you can build and experiment for less. And we currently have early-bird pricing which makes it an even better value! 🐥

Just one of many great perks of being part of the network ❤️

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay