?? main.c
字號:
#include <stdio.h>
#include<malloc.h>
#include<stdio.h>
#define NULL 0
struct node
{ int data;
int m;
struct node *next;
}sqlist;
void main()
{
struct node *p,*q,*l;
int i,k,temp,a[10]={4,7,6,3,4,6,8,1,9,3};
l=(struct node *)malloc(sizeof(struct node));
l->next=NULL;l->data=1;l->m=a[0];
p=l;
for(i=2;i<=10;i++)
{q=(struct node *)malloc(sizeof(struct node));
q->data=i;q->m=a[i-1];
p=q->next;p->next=NULL;}
l=p->next;
temp=a[0];
while(l->next!=l)
{i=0;
while(i!=temp)
{q=p;p=p->next;i++;}
temp=p->m;p->next=q->next;
l=p->next;}
printf("%d%d",l->data,l->m);
}
//#include <stdio.h>
//#include <stdlib.h>
//#include <conio.h>
//#include <math.h>
//#include"InputandOutput.h"
//#include"Jacobi.h"
//#include"GaussSeidel.h"
//
//void main()
//{ float A[MAX_n][MAX_n],x[MAX_n];
// int n;
// printf("\n請輸入方程個數 n=");
// scanf("%d",&n);
// if(n>=MAX_n-1)exit(0);
// Matrix(A,n,n+1);
// if(!Jacobi(A,x,n)) {
// printf("\nJacobi計算結果:");
// Output(x,n);
// }
// if(!G_S(A,x,n)) {
// printf("\nG-S計算結果:");
// Output(x,n);
// }
// printf("\n\n按鍵退出\n");
// getch();
//}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -