FUnction
#include<iostream>
using namespace std;
class Car{
char color[];
char name[];
int number;
char fuletype[];
};
///===============================
//without return without par
//without return with par
//with return with par
//with return without par
//without return without par
void ABC(){
cout<<"ABC Call";
}
//without return with par
void PrintName(char* name){
cout<<"Name="<<name;
}
//with return with par
int Sum(int a,int b){
return (a+b);
}
//
int Sub(){
int a,b;
cout<<"Please Input 2 Number"<<endl;
cin>>a>>b;
return (a-b);
}
//=================================
int main(){
char namabc[10];
int c;
cout<<"Computer"<<endl;
cout<<"ABC Call"<<endl;
ABC();//call
//========2======
cout<<"\nInput Name"<<endl;
cin>>namabc;
PrintName(namabc);
//========3====
c= Sum(40,50);
cout<<"\nSum="<<c;
//========4====
c=Sub();
cout<<"\nSub="<<c;
return 0;
}
Comments
Post a Comment