www.5129.net > 求程序代码

求程序代码

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

程序源码及运行结果如下所示(系统会自动去掉句首空格,排版较乱请见谅): #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...

写好了,你看看吧,有要求再提 #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.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...

用递归法求N的阶乘 程序调用自身称为递归( recursion).它通常把一个大型复杂的问题层层转化为一个与原问题相似的规模较小的问题来求解. 递归的能力在于用有限的语句来定义对象的无限集合。 一般来说,递归需要有边界条件、递归前进段和递归返...

#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;}

代码怎么做

public class Demo3 { public static void main(String[] args) { byte a =1; short b=1; int c = 1; long d = 1l; float e=1f; double f =1; char g ='1'; boolean h = true; System.out.println("byte a ="+a); System.out.println("short b="...

网站地图

All rights reserved Powered by www.5129.net

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