fork download
  1. //13
  2. #include <iostream>
  3. #include <string>
  4. #include <math.h>
  5. using namespace std;
  6. int main()
  7. {
  8. float R1,R2,S1,S2,S3,P;
  9. P=3.14;
  10. cout<<"Enter R1: ";
  11. cin >>R1;
  12. cout<<"Enter R2: ";
  13. cin >>R2;
  14. S1=P*R1*R1;
  15. S2=P*R2*R2;
  16. S3=S1-S2;
  17. cout<<"S1="<<S1;
  18. cout<<"\nS2="<<S2;
  19. cout<<"\nS3="<<S3;
  20.  
  21. }
Success #stdin #stdout 0s 4568KB
stdin
Standard input is empty
stdout
Enter R1: Enter R2: S1=inf
S2=0
S3=inf