Class-10 Computer
1. Write a program to print the sum of the two numbers passed as parameter.
#include<iostream>using namespace std;
void sum(int x,int y);
void sum(int a,int b)
{
int a,b;
int sum;
cout<<"Enter Two numbers "<<endl; cin>>a>>b;
sum=a+b;
}
int main()
{
int z=Sum(a,b) cout<<"Sum is "<<z<<endl;
}
1 Comments
Thank you so much
ReplyDelete