This commit is contained in:
2024-12-05 15:46:08 +08:00
parent 08f6f4b0f4
commit 4ae4cf8554
26 changed files with 1385 additions and 1381 deletions
+21 -21
View File
@@ -1,21 +1,21 @@
//test3.cpp
#include <iostream>
#include"LinkList.h" //LinkList类见实验一
using namespace std;
void alter_to_110_percent(bookList &l) {
bookNode *temp = l->next;
while (temp != NULL) {
temp->price *= 1.1;
temp = temp->next;
}
}
int main() {
bookList books = new bookNode;
books->next = NULL;
create(books);
alter_to_110_percent(books);
display(&books);
return 0;
}
//test3.cpp
#include <iostream>
#include"LinkList.h" //LinkList类见实验一
using namespace std;
void alter_to_110_percent(bookList &l) {
bookNode *temp = l->next;
while (temp != NULL) {
temp->price *= 1.1;
temp = temp->next;
}
}
int main() {
bookList books = new bookNode;
books->next = NULL;
create(books);
alter_to_110_percent(books);
display(&books);
return 0;
}