Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

帮忙改下错阿,菜鸟感谢

Posted by hebeimoumoumou at 2011-03-27 10:52:07
#include<iostream>
using namespace std;
struct note
{
int num;
struct note *next;
}

const int =10
struct note circle[n];

void main()
{
for (int i=0;i<n;i++)
circle.num=i+1;

for(i=0;i<n-2;i++)
circle.next=&circle;
circle[n-1]=&circle[0];

int m=8;

struct note circle_tem=circle[0];



for(i=0;i<n-2;i++)
{
  for(i=0;i<m;i++)
  circle_tem.next=circle_tem.next+1;// m+2 th  number's adress
  (circle_tem.next-3)->next=circle_tem.next-1;
  circle_tem=*(circle_tem.next-1);
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator