link list

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
331 B
0
Indexable
Never
#include <iostream>
#include <stdlib.h>


struct node {
	int value;
	struct node *next;
};

int main()
{
	int a[3] = {};
	for (int i = 0; i < 3; i++) {
		scanf("%d", a[i]);
	}

	node *current;
	while () {
		*current = (node *)malloc(sizeof(node));
		int a1 = a[0],a2= a[1];
		current -> value = a1+a2;
	}
	
}