请问哪里错了 (简单代码)

lth3185959 2012-10-06 09:49:29
import java.io.*;// you are importing the header files from the directory io in java , we put " * " at the end because that means everyfiles in that io directory is imported Source(s):
public class Sep59 {
public static void main(String[]args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//get noun
System.out.print("Enter your first number: ");
String ans1 = in.readLine();
//get adj
System.out.print("Enter your second number: ");
String ans2 = in.readLine();
//get adj
System.out.print("Enter your third number: ");
String ans3 = in.readLine();
//get verb
System.out.print("Enter your fourth number: ");
String ans4 = in.readLine();
//get adj
int x = ans1 + ans2 + ans3 + ans4
System.out.print("The total is" x);

}
}
...全文
185 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
小傅哥 2012-10-06
  • 打赏
  • 举报
回复
来吧 给我30QB吧 184172133 嘿嘿

import java.io.*;// you are importing the header files from the directory io in java , we put " * " at the end because that means everyfiles in that io directory is imported Source(s):
public class Sep59 {
public static void main(String[]args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//get noun
System.out.println("Enter your first number: ");
String ans1 = in.readLine();
//get adj
System.out.println("Enter your second number: ");
String ans2 = in.readLine();
//get adj
System.out.println("Enter your third number: ");
String ans3 = in.readLine();
//get verb
System.out.println("Enter your fourth number: ");
String ans4 = in.readLine();
//get adj 改动处:类型转换
int x = Integer.valueOf(ans1) + Integer.valueOf(ans2) + Integer.valueOf(ans3) + Integer.valueOf(ans4);
System.out.print("The total is" + x);

}
}
  • 打赏
  • 举报
回复
问一下啊,Q 币有什么用处?
进击的愤怒 2012-10-06
  • 打赏
  • 举报
回复
人家说要干嘛了吗,你就给他转整形了?![Quote=引用 1 楼 的回复:]

来吧 给我30QB吧 184172133 嘿嘿
Java code

import java.io.*;// you are importing the header files from the directory io in java , we put " * " at the end because that means everyfiles in that io directory ……
[/Quote]
V-003号 2012-10-06
  • 打赏
  • 举报
回复
流是资源,用完了可以关一下
跟网型逆变器小干扰稳定性分析与控制策略优化研究(Simulink仿真实现)内容概要:本文围绕跟网型逆变器的小干扰稳定性展开分析,重点研究其在电力系统中的动态响应特性及控制策略优化问题。通过构建基于Simulink的仿真模型,对逆变器在不同工况下的小信号稳定性进行建模与分析,识别系统可能存在的振荡风险,并提出相应的控制优化方法以提升系统稳定性和动态性能。研究内容涵盖数学建模、稳定性判据分析、控制器设计与参数优化,并结合仿真验证所提策略的有效性,为新能源并网系统的稳定运行提供理论支持和技术参考。; 适合人群:具备电力电子、自动控制或电力系统相关背景,熟悉Matlab/Simulink仿真工具,从事新能源并网、微电网或电力系统稳定性研究的研究生、科研人员及工程技术人员。; 使用场景及目标:① 分析跟网型逆变器在弱电网条件下的小干扰稳定性问题;② 设计并优化逆变器外环与内环控制器以提升系统阻尼特性;③ 利用Simulink搭建仿真模型验证理论分析与控制策略的有效性;④ 支持科研论文撰写、课题研究或工程项目中的稳定性评估与改进。; 阅读建议:建议读者结合文中提供的Simulink仿真模型,深入理解状态空间建模、特征值分析及控制器设计过程,重点关注控制参数变化对系统极点分布的影响,并通过动手仿真加深对小干扰稳定性机理的认识。

23,407

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧