88问答网
所有问题
当前搜索:
编写程序根据输入的学生成绩
6.
编写程序
:
根据
从键盘
输入的学生成绩
给出相应的等级。
答:
include "stdio.h"char swi(int grade){ int s;s=grade/10;switch(s){ case 10:return 'A';case 9: return 'A';case 8:return 'A';break;case 7:return 'B';break;case 6: return 'C';break;case 5:return 'D';case 4:return 'D';case 3:return 'D';case 2:return 'D...
编写程序
,从键盘
输入学生成绩
,
根据成绩
判断:
答:
else return "优";//其它,也就是90及以上,优。} public static void main(String args[]){ Scanner scan = new Scanner(System.in);while(true){ System.out.print("请
输入成绩
(输入非数字,退出
程序
):");try{ System.out.println("这个成绩的等级: "+getLevel(scan.nextDouble()));}ca...
编写程序
,
输入
一个
学生成绩
,给出相应等级:60~100优秀0~50不及格(java...
答:
import java.util.Scanner;public class Test {public static void main(String[] args) {Scanner input = new Scanner(System.in);System.out.println("请
输入学生的分数
:");double score = input.nextDouble();int level1,level2;if(score>=60.0 && score<=100.0){System.out.print("该学...
...4.
编写程序
,从键盘
输入学生成绩
,
根据成绩
判断:如果成绩小于60,则...
答:
public static void main(String[] args) throws Exception { System.out.print("请
输入成绩
:"); Scanner sc = new Scanner(System.in); String str = sc.nextLine(); try { int score = Integer.parseInt(str); if (score >= 0 && score < 60){ System.out.println("...
编写
一个Shell
程序
,能够
根据
键盘
输入的学生成绩
,显示相应的成绩标准(分...
答:
小于60差,60~79中,80~99 良, 100 优。 你可以自己进行适当的修改来符合你的要求。!/bin/bash case $1 in [0-9]|[0-5][0-9]) echo "差" ;;100) echo "优" ;;[8-9][0-9]) echo "良" ;;[6-7][0-9]) echo "中" ;;) echo "Invalid score $1" ;;esac ...
编写程序
,从键盘
输入
某
学生
的四科
成绩
,求出总分和平均分,找出最高分...
答:
public class Text1 { public static void main(String[] args){ Scanner sc = new Scanner(System.in);int a,b,c,d,sum,max=0,min;double p;System.out.println("请
输入
四门学科
的分数
");a=sc.nextInt();b=sc.nextInt();c=sc.nextInt();d=sc.nextInt();sum=a+b+c+d;p=sum/...
求
编写
一C语言
程序
:
输入
10个
学生
的4科
成绩
,求其平均值,总分,并排序...
答:
return c; /*返回选择项,主
程序根据
该数调用相应的函数*/}/*
输入
记录,形参为结构体数组,函数值返回类型为整型表示记录长度*/int enter(ADDRESS t[]){ int i,n; //clrscr(); /*清屏*/ printf("\nplease input num \n"); /*提示信息*/ scanf("%d",&n); /*输入记录数*/ printf("please input ...
编写程序
,从键盘
输入
五个
学生的成绩
x判断
学生成绩
等级。如果成绩x在...
答:
,&sc[0],&sc[1],&sc[2],&sc[3],&sc[4]); printf("the level of 5 score:"); for(i=0;i<5;i++) { if(sc[i]>=100||sc[i]<0) printf("ERR "); else if(sc[i]>=90) printf("A ")
C语言
编程
编写程序
,对
学生
的考试
成绩
给出评定信息。
答:
include<stdio.h>int main(void){int score=0;printf("input score: ");scanf("%d", &score );if ( score >= 90 ) printf("优秀\n");else if ( score >= 80 ) printf("良好\n");else if ( score >= 70 ) printf("中等\n");else if ( score >= 60 ) printf...
用C语言
编写
一个
程序
,
输入
N个
学生
的学号和
成绩
,求平均成绩,并输出其 ...
答:
include<stdio.h>#define N 5struct Stu{ int id; double score;};void sortScore(Stu s[N]){ int i; int min=0,max=0; for(i=1;i<N;i++){ if(s[i].score>s[max].score) max=i; if(s[i].score...
1
2
3
4
5
6
7
8
9
10
涓嬩竴椤
灏鹃〉
其他人还搜
根据输入的学生成绩判断等级
输入学生成绩输出成绩等级
c语言输入学生的学号和成绩
编写程序输入一个整数
编写程序从键盘输入一个整数
输入学生成绩并显示
编写程序入门
c语言按学号查找学生成绩
如何编写程序