虚假:(写了好久测试也没问题就是不AC的代码)
import java.util.Scanner;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
String decimal=in.nextLine();
BigInteger n=new BigInteger(decimal);
String hexStr=””;
BigInteger baseCode=new BigInteger(“16”);
BigInteger zero=new BigInteger(“0”);
while(!n.equals(zero)) {
纯模拟
c++代码
#include<bits/stdc++.h>
using namespace std;
int n,m,k,c;
int main(){
cin>>n>>m>>k;
while(k--){
int need=1;
queue<int>q;
stack<int>s;
int x,y=0;
for(int i=1;i<=n;i++){
cin>>x;
q.push(x);
}
while(1){
if(!q.empty()){
x=q.front();
}
if
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
int a, b;
while (cin.hasNext()){
a = cin.nextInt(); b = cin.nextInt();
System.out.println(a + b);
}
}
}
package workcheck;
import java.util.Scanner;
class a {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
String name=s.nextLine();
System.out.println("Welcome to Program World,"+name+"!");
}
}
int main()
{
// 1036:3.11给出一个月的总天数
//编写程序,提示用户输入月份和年份,然后显示这个月的天数。
//例如:如果用户输入的月份是2而年份是2000,那么程序应该显示“February 2000 has 29 days”(2000年2月有29天)。
//如果用户输入的月份为3而年份为2005,那么程序就应该显示“March 2005 has 31 days”(2005年3月有31天)。
//输入两个整数分别为月份m和年份y。 2 2000
//输出所输入年份和月份所对应的这个月的天数,格式应为 月份的英文 年份 has 天数 day。
//例如:“February 2000 has 29 days
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
double tuition = 10000;
for (int i = 0; i < n; i++) {
tuition = tuition * (1 + 0.05);
tuition = Math.ceil(tuition * 100) / 100;
}
double ntuition = tuition;
double sum = 0;
for (int i = 0; i < 4; i++) {
sum +=
void myprintf(double c,double b,double a,double d)//进行打印
{
if(((int)(a*1000))%10 == 0)//判断位数输出rate
if(((int)(a*100))%10 != 0)
printf("%.2f\t\t",a);
else
printf("%.1f\t\t",a);
else
printf("%.3f\t\t",a);
if(((int)(c*100))%10)//判断位数输出月money
printf("%.2f\t\t",c);
<!—Markdown—>
> 编写程序,提示用户 输入体重(以磅为单位)以及身高(以英寸为单位),然后显示BMI。
我还以为要先输出
> 输入数字 weight in pounds
输入数字 height in inches
然后再输出答案
然后头铁的我就错了七遍
不看标准输入输出是这样的
<!—Markdown—>
程序检验逻辑为:不大于1的均为单数(即meter),大于1的均为复数(即meters)。
(实际英语中应该是不等于1,均为复数形式吧)
int main(void)
{
float a,b,c,x,l,x1,x2,s;
int L,S;
scanf(“%f %f %f”,&a,&b,&c);
x=pow(b,2)-4ac;
x1=((-1)b+sqrt(x))/(2a);
x2=((-1)b-sqrt(x))/(2a);
l=x1-int(x1);
if(l==0)
L=0;
else
L=1;
s=x2-int(x2);
if(s==0)
S=0;
else
S=1;
if(x>0)
{
switch(L)
{
case 0:
printf(“The roots are %.f “,x1);
break;
case 1: