不清楚哪不對?
#include
int main() { ? ?int sale=120; //銷售業績為120萬 ? ?int year=1; //剛剛進入公司1年 ? ?//完善代碼 ? ? if(year>=2&&sale>100) ? ?{ ? ? ? ?printf("恭喜你獲獎了"); ? ?} ? ?else ? ? ? ?printf("很遺憾,期望你再接再厲"); ? ?return 0; } 哪不對????#include
int main() { ? ?int sale=120; //銷售業績為120萬 ? ?int year=1; //剛剛進入公司1年 ? ?//完善代碼 ? ? if(year>=2&&sale>100) ? ?{ ? ? ? ?printf("恭喜你獲獎了"); ? ?} ? ?else ? ? ? ?printf("很遺憾,期望你再接再厲"); ? ?return 0; } 哪不對????2015-07-29
舉報
2015-11-28
package yun;
public class knife {
public static void main(String[] args){
knife hello=new knife();
? ? ? ? // 調用方法,傳入兩門課程的成績
hello.calcAvg(94, 81);
}
/*
* 功能:計算兩門課程考試成績的平均分并輸出平均分
* 定義一個包含兩個參數的方法,用來傳入兩門課程的成績
*/
? ? ? ? public int calcAvg(int num1,int num2) {
? ? ? ? ? ? double num3=(num1+num2)/2;
? ? ? ? ? ? System.out.println("平均分:"+num3);
? ? ? ? }
}
求大神
2015-07-29
#include<stdio.h>?