How to create a inventory report using C?


Want to learn generating reports in C? Check out this article. Here I have provided the source code to generate reports in C.

How to create a inventory report using C?



C is a flexible,portable,powerful, and High level Programming language. Since C Is the one of the high level language and it contains assembler ,it is suitable for both systems and applications programming.

In this article am sharing my knowledge about how to create inventory report using C.
This source code only for a beginner in C# .

Source code for Inventory report in C




#define items 4
main()
{
int I;
quantity[5];
float rate[5];
value;
total_value;
char code[5][5];
I=1;
while(I<=items)
{ printf("Enter the code,Enter quantity,and rates:");
scanf("%s %d %f",code[I],&quantity[I],&rate[I]);
I++;}
printf("inventory report\n");
printf("....................\n");
printf("code quantity rate value\n");
printf("....................\n");
total_value=0;
I=1;
while(I<=items)
{
value=quantity[I] * rate[I];
printf("%5s %10d %10.2f %e\n",code[I],quantity[I],rate[I],value);
rate[I],value);
total_value += value;
I++;
}
printf(".................\n");
printf("....Total value=%e\n",total_value);
printf(".................\n");
getch()

}


Comments

Guest Author: Martin03 Dec 2012

why dont you buy a good one ? We are using mclane's



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: