⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print.cpp

📁 数据结构实验一中的长整数的加法
💻 CPP
字号:
// print.cpp : source file of the output functions
#include "stdafx.h"
#include<stdio.h>
#include"Dulinklist.h"

void print_1(void){
	printf("If you want to quit ,please input 'q' or 'Q'\n");
	printf("IF you want to continue ,please input other characters\n");
}


void print_Dulink(Dulinklist L){
	int size=L.size;
	LinkType p=L.head->prior;
	while(p->data==0&&(size>1)){
		size--;
		p=p->prior;
	}
	if(L.head->data==1)printf("-");
	printf("%d",p->data);
	p=p->prior;
	while(p!=L.head){
		printf(",");
		if(p->data/1000)printf("%d",p->data);
		else if(p->data/100)printf("0%d",p->data);                                                                                                                  
		else if(p->data/10)printf("00%d",p->data);
		else printf("000%d",p->data);
		p=p->prior;
	}
	printf("\n");
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -