1 solutions
-
0
C :
#include<string.h> #include<stdio.h> int main() { double m; scanf("%lf",&m); if(m>=92.8) printf("jin"); if(m>=85.6&&m<92.8) printf("yin"); if(m>=82.1&&m<85.6) printf("tong"); if(m<82.1) printf("sorry"); return 0; }
C++ :
#include <bits/stdc++.h> using namespace std; int main(){ double n; cin>>n; if(n >= 92.8){ cout<<"jin"; }else if(n >= 85.6){ cout<<"yin"; }else if(n >= 82.1){ cout<<"tong"; }else{ cout<<"sorry"; } }
Java :
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); double n = sc.nextDouble(); if(n >= 92.8){ System.out.println("jin"); }else if(n >= 85.6 && n < 92.8){ System.out.println("yin"); }else if(n >= 82.1 && n < 85.6){ System.out.println("tong"); }else if(n < 82.1){ System.out.println("sorry"); } sc.close(); } }
Python :
n = float(input()) if n >= 92.8: print('jin') if 85.6 <= n < 92.8: print('yin') if 82.1 <= n < 85.6: print('tong') if n < 82.1: print('sorry')
- 1
Information
- ID
- 10246
- Time
- 1000ms
- Memory
- 64MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By