- Program :
#include <iostream>
#include <string>
using namespace std;
void myFunction(string fname, int age) {
cout << fname << " Venkat" << age << " years old. \n";
}
int main(){
cout <<"\n----------------FUNCTION PARAMETERS----------------\n";
cout <<"\n----------------Multiple Parameters----------------\n";
myFunction("Monisha", 3);
myFunction("Janani", 14);
myFunction("Ramya", 30);
return 0;
}
- Output :
No comments:
Post a Comment