Saturday, July 29, 2017

Write a C++ program to declare two integer , one float variables and assign 10, 15, and 12.6 to them respectively.

/*
For more exercises and lessons, visit http://shegertech.blogspot.com/
*/

#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    int x;
    int y;
    float z;
    x=10;
    y=15;
    z=12.6;
    cout<<"x="<<x <<"\t"<<"y= "<<y<<"\t"<<"z="<<z;
    cout<<"\n";
     
    system("PAUSE");
    return EXIT_SUCCESS;
}

Share: