Search This Blog

Sunday, 23 August 2020

Function with arguments,,

 #include<iostream>

#include<conio.h>

using namespace std;



int add(int ,int );

float div(int ,float );

char add(char ,char );

//double sub(int ,int );

//long multi(int ,int );


int add(int x,int y)

{

cout<<"addition is:"<<(x+y);

}

float div(int x,float y)

{

cout<<"dividation is:"<<(x/y);

}

char add(char x,char y)

{

cout<<"two strings:"<<x+y;

}

int main()

{

int a,b;

char c,d;

cout<<"enter the two numbers";

cin>>a>>b;

add(a,b);

div(a,b);

cout<<"Enter the two strings:"<<endl;

cin>>c>>d;

add(c,d);n

getch();

return 0;

}


No comments:

Post a Comment

Search This Blog

Contact Form

Name

Email *

Message *

Popular Posts