Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam eu est quis enim commodo aliquet. Vestibulum eleifend venenatis massa. Curabitur rutrum accumsan felis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus ut augue eu purus iaculis viverra. Maecenas vehicula dictum diam.

Read More

Linklist 1701293010 Michael Wijaya

#include <stdio.h>
#include <stdlib.h>

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

int main(){
struct node *root;
struct node *conductor;
int flag = 0;
root = (struct node*)malloc(sizeof(struct node));
root->next=0;
do{
printf(“Masukkan angka [1…100] :”);
scanf(“%d”,&root->x);fflush(stdin);
}while(root->x<0||root->x>100);
flag++;
while(flag<=10){
system(“cls”);
conductor=root;
printf(“%d”,conductor->x);
while(conductor->next!=0){
conductor=conductor->next;
printf(“->%d”,conductor->x);
}
if(flag==10)
{
break;
}
conductor->next=(struct node*)malloc(sizeof(struct node));
conductor=conductor->next;
conductor->next=0;
printf(“\n”);
do{
printf(“Masukkan angka [1…100] :”);
scanf(“%d”,&conductor->x);fflush(stdin);
}while(conductor->x<0||conductor->x>100);
flag++;
}
getchar();
return 0;
}

Filed under:Uncategorized

Leave a Reply