0% found this document useful (0 votes)
5 views2 pages

Prime Numbers and Product Stock Check

Uploaded by

rupams2024
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Prime Numbers and Product Stock Check

Uploaded by

rupams2024
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Q:- Accept 2 numbers say n1 and n2.

Display all prime numbers between na and n2.

[Link]("Enter the productId of the Selected Product Name to check


available stock ");

[Link]("================================================================
==========");
int productid = Convert.ToInt32([Link]());
int availableStock = 0;
switch(purc)
{
case 101:
availableStock = [Link]
break;
case 102:
break;
case 103:
break;
default:
break;
}

==========================================================================
List<Product> listProduct = new List<Product>()
{
new Product{ProductId=101,ProductName="Megatop Black Pens"},
new Product{ProductId=102,ProductName="Sketches green"},
new Product{ProductId=103,ProductName="Erasers"}
};

List<Sales> listSales = new List<Sales>()


{
new Sales{ProductId=101,SalesQuantity=25},
new Sales{ProductId=102,SalesQuantity=5},
new Sales{ProductId=103,SalesQuantity=10}
};
List<Purchase> listPurchase = new List<Purchase>()
{
new Purchase{ProductId=101,PurchaseQuantity=100},
new Purchase{ProductId=102,PurchaseQuantity=25},
new Purchase{ProductId=103,PurchaseQuantity=20}
};

[Link]("Enter the Id of the Selected Product Name to check


available stock ");

[Link]("================================================================
==========");
[Link]("Id\t\t Product Name");
[Link]("101\t\tMegatop Black Pens");
[Link]("102\t\tSketches green");
[Link]("103\t\tErasers");
int productid = Convert.ToInt32([Link]());
int availableStock = 0;
if(.ProductId == productid && [Link]==productid)
{
availableStock = [Link] - [Link];
[Link]($"Stock Quantity is :{availableStock}");
}

You might also like