Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int medie(int a,int b)
- {
- int m;
- m=(a+b)/2;
- }
- int main()
- {
- int a,b,n,i,max=-9999;
- cout<<"n= ";cin>>n;
- for (i=1;i<=n;i++)
- {
- cout<<"a= ";cin>>a;
- cout<<"b= ";cin>>b;
- if (medie(a,b)>max)
- max=medie(a,b);
- }
- cout<<max;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement