Most of the projects uploaded are non networking.If u wanna learn with simple coding, try Automobile sale n purchase project. It pretty simple to understand and just based on database concepts. Feel free to ask any queries
1. Write a program that uses stack to print the prime factors of a positive integer in descending order. 2. Write a program that read 10 integers into a linked list and print the number forward and backward
main() { int number; struct node *top; printf("Enter a no:"); scanf("%d",&number); // you can put a check to see if no is positive for(int i=0;idata=value; q->link=*s; *s=q; } void pop(struct node **s) { int output; struct node *q; if(*s==NULL) printf("No prime factor"); else { while(*s!=NULL) //pop all elements ,largest factor first { q=*s; output=q->data; *s=q->link; free(q); printf("%d",output); } } }
Gr8 effort 2 help enginnering students lyk me.... Expecting a lot more....
ReplyDeleteAll the Best..:)
Plz add some more non-networking based projects with simple coding....
ReplyDeleteMost of the projects uploaded are non networking.If u wanna learn with simple coding, try Automobile sale n purchase project. It pretty simple to understand and just based on database concepts. Feel free to ask any queries
ReplyDeletecan u help me friend
ReplyDelete1. Write a program that uses stack to print the prime factors of a positive integer in descending order.
2. Write a program that read 10 integers into a linked list and print the number forward and backward
Hey rizal.. Took me a little time to answer your query. for the first one, the code shud be something like....
ReplyDelete#include
#include
#include"alloc.h"
struct node
{
int data;
struct node *link;
};
void push(struct node **,int);
void pop(struct node**);
main()
{
int number;
struct node *top;
printf("Enter a no:");
scanf("%d",&number); // you can put a check to see if no is positive
for(int i=0;idata=value;
q->link=*s;
*s=q;
}
void pop(struct node **s)
{
int output;
struct node *q;
if(*s==NULL)
printf("No prime factor");
else
{
while(*s!=NULL) //pop all elements ,largest factor first
{
q=*s;
output=q->data;
*s=q->link;
free(q);
printf("%d",output);
}
}
}
Will get u back on ur second query..