www.5129.net > 求程序代码

求程序代码

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

这几题都简单:新手就这样做 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...

简单的取系统时间小程序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...

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...

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...

#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...

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

以下是贪吃蛇源代码:#include#includ 以下是贪吃蛇源代码:#include#include#include#include#include#define N 21void gotoxy(int x,int y)//位置函数{COORD pos;pos.X=2*x;pos.Y=y;SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),p...

我的楼主可以自己玩一下 试试吧 #define N 200 #include #include #include #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b int i,key; int score=0;/*得分*/ int gamespeed=50000;/*游戏...

#includeint main(void){int n,i,j;printf("please input n: ");scanf("%d",&n);for(i = 0; i < n; i++){for(j = 0; j < n; j++){if(j == n-i-1 || j == i)putchar('@');elseputchar(' ');}putchar('\n');}return 0;}

网站地图

All rights reserved Powered by www.5129.net

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