Saved Bookmarks
| 1. |
Write a macro that obtains the largest of three numbers in c++ |
|
Answer» #include #include void MAIN() { clrscr(); int largest(int,int,int); COUT<<"Enter 3 Integer Numbers\n"; int a,B,c; cin>>a>>b>>c; int result; result=largest(a,b,c); cout<<"\n\nLargest Value of INPUTED is "< getch(); } inline largest(int a,int b,int c) { int z; z=(a>b)?((a>c)?a:c):((b>c)?b:c); RETURN(z); } |
|