File size: 353 Bytes
c4b0eef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c;
while(a!=0||b!=0||c!=0)
{
d=b-a;
if(d==(c-b))
{
cout<<"AP "<<(c+d)<<endl;
}
else
{
d=b/a;
cout<<"GP "<<(c*d)<<endl;
}
cin>>a>>b>>c;
}
return 0;
}
|