22 lines
427 B
C++
22 lines
427 B
C++
//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;
|
|
}
|