Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /*
- Team
- Balão Vermelho
- */
- int main (){
- double x, I=3;
- int l;
- scanf("%d", &l);
- while (l!=0){
- if((l%3)!=0){
- I = (3 + (((l-1)/3)-1)*6) + (l%3)*2;
- }else{
- I = 3 + ((l/3)-1)*6;
- }
- x = (I-l)/l;
- printf("%.6lf\n", x);
- scanf("%d", &l);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement