首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
a = int(input())
b = int(input())
x = a + b
print(a,'+',b,'=',x)
print()
if a >= b:
    l_a = len(str(a))
    l_b = len(str(b)) 
    l_x = len(str(x))
    print('  ', str(a))
    print('+',' '*(l_a-l_b),str(b))
    print('-'*(l_a)*2)
......................
阅读全部 | chen1024 贴于 2022年7月16日 21:00     hide bbsi
a = int(input())
b = int(input())
x = a + b
print(a,'+',b,'=',x)
print()
if a >= b:
    l_a = len(str(a))
    l_b = len(str(b)) 
    l_x = len(str(x))
    print('  ', str(a))
    print('+',' '*(l_a-l_b),str(b))
    print('-'*(l_a)*2)
......................
阅读全部 | chen1024 贴于 2022年7月16日 20:57     hide bbsi
(defun sayHello(name)
    (format t "Hello ~a" name)
)
(sayHello "编程中国")

(write-line "")
(write-line "")

; 练习一下循环的使用
(loop for a from 1 to 20
    do (format t "我爱编程中国 ~N  次" a)
    (write-line "")
......................
阅读全部 | Qwe899 贴于 2022年7月16日 14:32     hide bbsi
Module Program
Sub Main(args As String())
Console.WriteLine("我在编程中国学VB.NET")
Console.WriteLine()

'练习一下循环的使用
For i As Integer = 1 To 20
Console.WriteLine("我爱编程中国 {5} 次", i)
Next

Console.Write(vbLf & vbLf & "绘制一个心形图案:")

......................
阅读全部 | Qwe899 贴于 2022年7月15日 21:00     hide bbsi
Module Program
Sub Main(args As String())
Console.WriteLine("我在编程中国学VB.NET")
Console.WriteLine()

'练习一下循环的使用
For i As Integer = 1 To 20
Console.WriteLine("我爱编程中国 {5} 次", i)
Next

Console.Write(vbLf & vbLf & "绘制一个心形图案:")

......................
阅读全部 | Qwe899 贴于 2022年7月15日 21:00     hide bbsi
#include <stdio.h>
void inter(int*u,int *v);
int main(void)
{
    int x=5,y =6;
    
    printf("%d %p\n",x,&x);
    printf("%d %p\n",y,&y);
    inter(&x,&y);
     printf("%d %p\n",x,&x);
     printf("%d %p\n",y,&y);
return 0;
......................
阅读全部 | wwj19991101 贴于 2022年7月15日 16:20     hide bbsi
#include<stdio.h>
int facr(int n);
int main()
{
   int num;
   scanf("%d",&num);
   printf("%d",facr(num));
   //printf("%d",rfact(num));
    return 0;
}
int facr(int n)
{
......................
阅读全部 | wwj19991101 贴于 2022年7月15日 15:08     hide bbsi
Option Explicit
Const C_GameWith = 1024
Const C_GameHeight = 768
Const C_GameSmallWith = 320
Const C_GameSmallHeight = 240
'黑带   16  20
Dim GamehWnd, dm, AppName, config, bgkms, KMData
config = ".\Angel.ini"
AppName = "Angel_BP"
Function CmpMutlColor(Args, Sleep)
    Dim i
    For i = 0 To UBound(Args)
......................
阅读全部 | Qwe899 贴于 2022年7月15日 13:30     hide bbsi
/**
 * 【程序2】
 * 题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月
 *       后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?
 * 程序分析:兔子的规律为数列1,1,2,3,5,8,13,21....
 */

// #include<stdio.h>

// int main() {
//     long int f1,f2;
//     int i;
......................
阅读全部 | dzyyyy 贴于 2022年7月15日 12:17     hide bbsi
#include<stdio.h>
int imax(int n,int m);
int main()
{
    printf("the maximum of %d and %d is %d.\n",3 ,5,imax(3,6));
    printf("the maximum of %d and %d is %d.\n",3 ,5,imax(3.0,5.0));
    return 0;
}
int imax(int n,int m)
{
    return(n>m?n:m);
}
阅读全部 | wwj19991101 贴于 2022年7月15日 11:13     hide bbsi
上一页 32 33 34 35 36 37 38 39 40 41 下一页