(defun sayHello(name)
(format t "Hello ~a" name)
)
(sayHello "编程中国")
(write-line "")
(write-line "")
; 练习一下循环的使用
(loop for a from 1 to 20
do (format t "我爱编程中国 ~d 次" a)
(write-line "")
......................
阅读全部
|
miguo
贴于 2025年4月12日 09:28
hide
bbsi
public class HelloWorld {
public static void main(String[] args) {
System.out.println("我在编程中国学JAVA");
System.out.println();
// 练习一下循环的使用
for (int i=1; i<=20; i++) {
System.out.printf("我爱编程中国 %d 次\n", i);
}
System.out.printf("\n\n绘制一个心形图案:");
......................
阅读全部
|
RicardoM
贴于 2025年4月3日 22:37
hide
bbsi
#include<stdio.h>
#include<stdlib.h>
typedef struct Lnode{
struct Lnode *next;
int data;
}Lnode,*ListLink;
Lnode* SearchSame(ListLink L1,ListLink L2){
if(L1==NULL || L2==NULL){return NULL;}
int lengthL1=0,lengthL2=0;Lnode *p;
p=L1;
while(p->next!=NULL){lengthL1++;p=p->next;}
......................
阅读全部
|
sdcz
贴于 2025年3月14日 10:53
hide
bbsi
#include<stdio.h>
//以最小为开头,一个一个型
/*int sort(int A[],int low,int high){
int temp;
int mean=(low+high)/2;
if((A[mean]-A[low])*(A[mean]-A[high])<=0){temp=A[low];A[low]=A[mean];A[mean]=temp;}
else if((A[low]-A[mean])*(A[low]-A[high])<=0){}
else{temp=A[high];A[high]=A[low];A[low]=temp;}
temp=A[low];
while(low<high){
while(low<high && A[high]>=temp){high--;}
A[low]=A[high];
......................
阅读全部
|
sdcz
贴于 2025年3月13日 19:01
hide
bbsi
#include<stdio.h>
#include<stdlib.h>
#define initsize 100
typedef struct{
int *data;
int length;
int maxsize;
}sqlist;
void createlist(sqlist &L){
L.data=(int *)malloc(sizeof(int)*initsize);
L.length=0;
L.maxsize=initsize;
......................
阅读全部
|
sdcz
贴于 2025年3月11日 00:03
hide
bbsi
#include<stdio.h>
/*打印输入中单词长度的直方图(水平)*/
int main()
{
int c, i, nc, n;
nc = n = 0;//初始化赋初值
c = getchar();
while (c != EOF)//循环体输入
{
while (c == ' ' || c == '\t' || c == '\n')
c = getchar();//去除开始的空格
......................
阅读全部
|
gxd168
贴于 2025年1月13日 23:42
hide
bbsi
#include<stdio.h>
int main()
{
printf("hello world");
return 0;
}
阅读全部
|
木叶飞舞
贴于 2024年8月9日 17:54
hide
bbsi
#include<stdio.h>
int main()
{
printf("hello world");
return 0;
}
阅读全部
|
木叶飞舞
贴于 2024年8月9日 17:53
hide
bbsi
#include<stdio.h>
int main()
{
printf("hello world")
return 0
}
阅读全部
|
木叶飞舞
贴于 2024年8月9日 17:52
hide
bbsi
#include<stdio.h>
int main()
{
printf("hello world")
return0
}
阅读全部
|
木叶飞舞
贴于 2024年8月9日 17:51
hide
bbsi