1 solutions

  • 0
    @ 2025-11-5 15:09:11

    C :

    #include <stdio.h>
     
    int main()
    {
        int a;
        float b1,b;
        while(scanf("%d",&a) != EOF)
     {
     if (a==1)
      {
       b=21*0.3174*0.3174*0.6826*0.6826*0.6826*0.6826*0.6826;	
      } 
       
     else
       b =0.0001;
         printf("%.4f\n",b);	
      
      }
        return 0;
    }
    
    

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    	int a;
    	float b;
    	cin>>a;
    	if(a==1){
    		b=0.3135;
    		cout<<b<<endl;
    	}
    	else{
    		b=0.0001;
    		cout<<b<<endl;
    	}
    
    	return 0;
    }
    

    Java :

    import java.util.Scanner;
    
    public class Main{
    
    	public static void main(String[] args) {
    		Scanner reader = new Scanner(System.in); 
    		int a;
    		while(reader.hasNext()){
    			a = reader.nextInt();
    			if(a==0){
    				System.out.println("0.0001");
    			}
    			else if(a==1){
    				System.out.println("0.3135");
    			}
    		}
    
    	}
    
    }
    
    • 1

    Information

    ID
    16449
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By