Search This Blog

Friday, 21 August 2020

Arguments in program

 #include<iostream>

#include<conio.h>

using namespace std;



int age(int,int);

struct name(struct,struct,struct);


int main()

{

int a,b;

char c,d,e;

cout<<"Enter the birth year:"<<endl;

cin>>a;

cout<<"Enter the current year year:"<<endl;

cin>>b;

cout<<"Your age is :"<<age(a,b);


cout<<"\nEnter your sirname:"<<endl;;

cin>>e;

getch();

cout<<"\nEnter the fathers name:"<<endl;

cin>>d;

getch();

cout<<"\nEnter the name:"<<endl;

cin>>c;

getch();

cout<<"Your name is:\n"<<endl;

cout<<name(c,d,e );

cout<<endl;


getch();

return 0;

}

int age(int x,int y)

{

return(y-x);

}

struct name(char x,char y,char z)

{


 cout<<x<<" "<<y<<" "<<z;

 }


No comments:

Post a Comment

Search This Blog

Contact Form

Name

Email *

Message *

Popular Posts