{ PO } - PURCHASE ORDER PROCESS
scenario: Whether a particular product in a super market is in stock or needs to be order.let us take milk🥛 as that one product.We will calculate🖩 whether to order or not keeping its previous stock level and the current stock level.
//SUPER MARKET STOCK PO CALCULTION
//USING IF Statement.
#include<stdio.h>
void main()
{
int available_stock,previous_stock,saled_stock,pur_order_stock,total_stock;
char product_name;
printf("------AK super market ------\n");
printf("Enter the product name :");
scanf("%s",&product_name); // Milk
printf("Enter the old stock quantity :");
scanf("%d",&previous_stock); //100
printf("Enter the soled stock:");
scanf("%d",&saled_stock); //90
available_stock= previous_stock-saled_stock; // 100-90 = 10
if ( available_stock <=12) // in this comparison 12 .which means one dozen (12)
{
printf("----------------------no of stocks qty are low---------------------------\n");
printf(" Enter the order quantity :");
scanf("%d",&pur_order_stock); // 100
total_stock= available_stock+pur_order_stock; //10+100=110
printf("After order available quantity is :%d\t",total_stock);
}
else {
printf("-------------Stocks have to run ------------------- ");
}
}
This is a simple task for po arising .and using simple if .. but this programmatic operation help to calculate the stock with using DB🔒 connections are the next level⼈ for the projects .
___________________________________________________________________________________
OUTPUT:
------AK super market ------
Enter the product name :Milk
Enter the old stock quantity :100
Enter the soled stock:90
----------------------no of stocks qty are low---------------------------
Enter the order quantity :100
After order available quantity is :110
_______________________________________________________________________________ ...............................................else the condition not satisfy:.......................................................................
------AK super market ------
Enter the product name :Milk
Enter the old stock quantity :100
Enter the soled stock:80
-------------Stocks have to run -------------------
No comments:
Post a Comment