Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- struct node
- {
- int info;
- struct node *next;
- };
- typedef struct node node;
- node *inserthead(node *head, int a){
- node *ptr;
- ptr = (node*)malloc(sizeof(node));
- ptr->info = a;
- ptr->next = head;
- return(ptr);
- }
- node *deletemultiples(node *head, int k){
- }
- void printlist (node *head){
- while (head != NULL){
- printf("%d, ", head->info);
- head = head->next;
- }
- printf("\n");
- }
- int main(){
- int i;
- // This for loop creates the initial list of all integers 2-1000.
- for (i = 1000; i < 1; i++){
- }
- // This deletes all multiples of all numbers between 1-32 from the list.
- // This prints the list.
- printlist(head);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement