首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
#include <stdio.h>
#define MONTHS 12
int main() 
{
    int days[MONTHS]={31,28,31,32,45,56,67,76,45,34,49,90};
    int index;
    for(index=0;index<MONTHS;index++)
    {
        printf("Month %2d has %d days.\n",index+1,*(days+index));

    }
return 0;
......................
阅读全部 | wwj19991101 贴于 2022年7月17日 12:55     hide bbsi
#include <stdio.h>
#define SIZE 4
int main() 
{
   short arr1[SIZE];
   short * pti;
   short  index;
   double arr2[SIZE];
   double * ptf;
   pti=arr1;
   ptf=arr2;
   printf("%23s %15s\n","short","double");
......................
阅读全部 | wwj19991101 贴于 2022年7月17日 11:21     hide bbsi
#include <stdio.h>
#define SIZE 4
int main() 
{
    int arr[]={1,2,3,45,5,6,76,8,6,43,34,53};
    int i;
    for(i=0;i<sizeof arr/sizeof arr[0];i++)
    {
        printf("%d%10d\n",i ,arr[i]);
    }
return 0;
}
阅读全部 | wwj19991101 贴于 2022年7月17日 10:08     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日 21:05     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日 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
上一页 33 34 35 36 37 38 39 40 41 42 下一页