当前位置:网站首页>Basic types of 100 questions for basic grammar of Niuke
Basic types of 100 questions for basic grammar of Niuke
2022-07-08 00:40:00 【InfoQ】
Niuke basic grammar must be brushed 100 Basic types of questions
BC3 Niuniu learns to speak - Integers
describe
Input description :
Output description :
Example 1
3
3
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
System.out.println(a);
}
}
BC4 Niuniu learns to speak - Floating point numbers
describe
Input description :
Output description :
Example 1
1.359578
1.360
import java.util.Scanner;
public class Main{
public static void main(String[] args){
float a;
Scanner sc=new Scanner(System.in);
a=sc.nextFloat();
System.out.println(String.format("%.3f",a));
}
}
BC5 Niuniu learns to speak - character
describe
Input description :
Output description :
Example 1
a
a
import java.util.Scanner;
public class Main{
public static void main(String[] args){
String c;
Scanner sc=new Scanner(System.in);
c=sc.nextLine();
System.out.println(c);
}
}
BC6 The second integer of Niuniu
describe
Input description :
Output description :
Example 1
1 2 3
2
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
int a[]=new int[3];
for(int i=0;i<a.length;i++){
a[i]=in.nextInt();
}
System.out.println(a[1]);
}
}
边栏推荐
- Course of causality, taught by Jonas Peters, University of Copenhagen
- 基于微信小程序开发的我最在行的小游戏
- Service Mesh介绍,Istio概述
- Solution to the problem of unserialize3 in the advanced web area of the attack and defense world
- 什么是负载均衡?DNS如何实现负载均衡?
- How can CSDN indent the first line of a paragraph by 2 characters?
- Cause analysis and solution of too laggy page of [test interview questions]
- 国外众测之密码找回漏洞
- LeetCode刷题
- Reading notes 004: Wang Yangming's quotations
猜你喜欢
Tencent security released the white paper on BOT Management | interpreting BOT attacks and exploring ways to protect
他们齐聚 2022 ECUG Con,只为「中国技术力量」
The underlying principles and templates of new and delete
CVE-2022-28346:Django SQL注入漏洞
[programming problem] [scratch Level 2] draw ten squares in December 2019
QT adds resource files, adds icons for qaction, establishes signal slot functions, and implements
Lecture 1: the entry node of the link in the linked list
Smart regulation enters the market, where will meituan and other Internet service platforms go
2022-07-07:原本数组中都是大于0、小于等于k的数字,是一个单调不减的数组, 其中可能有相等的数字,总体趋势是递增的。 但是其中有些位置的数被替换成了0,我们需要求出所有的把0替换的方案数量:
Service mesh introduction, istio overview
随机推荐
单机高并发模型设计
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
Prompt configure: error: required tool not found: libtool solution when configuring and installing crosstool ng tool
ABAP ALV LVC模板
paddle入门-使用LeNet在MNIST实现图像分类方法二
51与蓝牙模块通讯,51驱动蓝牙APP点灯
Tencent security released the white paper on BOT Management | interpreting BOT attacks and exploring ways to protect
If an exception is thrown in the constructor, the best way is to prevent memory leakage?
The underlying principles and templates of new and delete
QT adds resource files, adds icons for qaction, establishes signal slot functions, and implements
NVIDIA Jetson测试安装yolox过程记录
Is 35 really a career crisis? No, my skills are accumulating, and the more I eat, the better
商品的设计等整个生命周期,都可以将其纳入到产业互联网的范畴内
Flask learning record 000: error summary
1293_FreeRTOS中xTaskResumeAll()接口的实现分析
SQL knowledge summary 004: Postgres terminal command summary
Development of a horse tourism website (realization of login, registration and exit function)
接口测试要测试什么?
取消select的默认样式的向下箭头和设置select默认字样
Codeforces Round #804 (Div. 2)(A~D)