Pointer Struct_002


#include <iostream>
using namespace std;
struct data{
       int x,y;
       };
int main()
{
    data se;
    data *p;
    p=&se;
    cout<<"Please enter the first Integer:"<<endl;
    cin>>p->x;
    cout<<"Please enter the second Integer:"<<endl;
    cin>>p->y;
    cout<<"The Multiplication of two integer is:"<<endl;
    cout<<p->x*p->y<<endl;
    system("pause");
    return 0;
}
    

0 comments:

Post a Comment