www.5129.net > 求程序代码

求程序代码

#include main() { int a,b,c; printf("请输入两个整数:"); scanf("%d%d",&a,&b); c=a+b; printf("这两个数的和是:\n%d+%d=%d",a,b,c); } #include void main() { int a,b,sum; a=123;b=456; sum=a+b; printf("sum is %d\n",sum); } 完成

#define PI 3.1415926 #include #include using namespace std; int days_of_month_1[]={31,28,31,30,31,30,31,31,30,31,30,31}; int days_of_month_2[]={31,29,31,30,31,30,31,31,30,31,30,31}; long double h=-0.833; //定义全局变量 void inp...

import java.awt.Dimension;import java.awt.Graphics;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JPanel;public class Painter exten...

程序源码及运行结果如下所示(系统会自动去掉句首空格,排版较乱请见谅): #includeint main(){int max,min;int sum=0;printf("请输入一个整数:");scanf("%d",&max);printf("请再输入一个整数:");scanf("%d",&min);if(min>max){int temp;temp...

写好了,你看看吧,有要求再提 #include #include int main(){ char input[50]; printf("请问 1+1="); for(;;){ gets(input); if(strcmp(input,"2")==0) {puts("正确");break;} printf("重新输入 1+1="); } getch(); }

import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; public class Save { public static void main(String[] args) { for (int i = 0; i < 5; i++) { String str = ""; Scanner...

1、题目: 把1-10的整数,先判断是否为偶数,并计算它们的和,最后做一下验证 2、程序: clc;clear; sum0=0; for i=1:10 %循环 if(mod(i,2)==0)%分支 sum0=sum0+i; end end %检测 test_data=[2:2:10];%顺序 test=sum(test_data); [sum0 test] 3、...

简单的取系统时间小程序code segment assume cs:code start: mov ah,2ch;2ch号功能调用,取系统时间:ch,cl,dh中分别存放时分秒 int 21h calldisptime;调用disptime子程序显示时间 exit: mov ax,4c00h;结束程序,返回DOS int 21h disptime pr...

这几题都简单:新手就这样做 1: #include void main() {printf("%d,%o,%x",0,0,0); printf("%d,%o,%x",9,9,9); printf("%d,%o,%x",A,A,A); printf("%d,%o,%x",Z,Z,Z); } 2: #include void main() {int a,b,t; scanf("%d,%d",&a,&b); t=a;a=b;b...

import java.awt.BorderLayout;import java.awt.Dimension;import java.awt.GridLayout;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JFra...

网站地图

All rights reserved Powered by www.5129.net

copyright ©right 2010-2021。
www.5129.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com