हेलो दोस्तों !
आज की इस C project to filter item like shopping website in Hindi | with source code पोस्ट में हम items को filter करने का project C programming की मदद से बनाना सीखेंगे। तो दोस्तों अगर आप इस project को बनाना चाहते है तो इस पोस्ट को अंत तक जरूर पढ़े।
इस पोस्ट के मुख्य विषय निन्म है -
- items को filter करना क्या है ?
- items filter project overview.
- items filter project source code.
- project explanation video.
1.item को filter करना क्या है :-
2.item filter project overview :-
- filter_product function.
- filter_Brand_Name function.
- filter_RAM function.
- filter_Price function.
main function :-
1.filter_product function :-
2.filter_Brand_Name function :-
3.filter_Ram function :-
4.filter_Price function :-
3.item filter project source code :-
project source code :-
//This is a product filter mathod project
#include < stdio.h >
#include < string.h >
#include < stdlib.h >
char mobile_brand[6][10] = {{"realme"}, {"oppo"}, {"vivo"}, {"poco"}, {"sumsung"}, {"nokia"}};
int realme_ram[] = {6, 4, 4, 6, 3};
int realme_price[] = {14000, 12000, 10000, 13000, 8000};
int oppo_ram[] = {3, 6, 4, 6, 4};
int oppo_price[] = {9000, 14000, 11000, 12000, 9000};
int vivo_ram[] = {4, 6, 3, 6, 4};
int vivo_price[] = {12000, 14000, 8000, 13000, 10000};
int poco_ram[] = {4, 3, 4, 6, 3};
int poco_price[] = {10000, 8000, 9000, 12000, 7000};
int sum_ram[] = {4, 3, 6, 4, 6};
int sum_price[] = {11000, 8000, 14550, 10000, 13000};
int nokia_ram[] = {3, 4, 6, 4, 6};
int nokia_price[] = {8000, 11000, 13000, 10000, 12000};
void filter_Brand_Name()
{
char brandName[10];
int check = 1, choose, count = 0;
printf("Enter Brand Name: ");
fflush(stdin);
gets(brandName);
printf("\n\t\tOnline mobile shopping\n");
printf("***************************************************\n");
printf("* Brand name RAM Price \n");
printf("***************************************************\n");
for (int i = 0; i < 6; i++)
{
check = strcmp(brandName, mobile_brand[i]);
if (check == 0)
{
for (int j = 0; j < 5; j++)
{
switch (i)
{
case 0:
printf("* %s %d %d\n", brandName, realme_ram[j], realme_price[j]);
break;
case 1:
printf("* %s %d %d\n", brandName, oppo_ram[j], oppo_price[j]);
break;
case 2:
printf("* %s %d %d\n", brandName, vivo_ram[j], vivo_price[j]);
break;
case 3:
printf("* %s %d %d\n", brandName, poco_ram[j], poco_price[j]);
break;
case 4:
printf("* %s %d %d\n", brandName, sum_ram[j], sum_price[j]);
break;
case 5:
printf("* %s %d %d\n", brandName, nokia_ram[j], nokia_price[j]);
break;
}
}
count = 1;
break;
}
}
if (count == 0)
{
printf("Sorry! no results found\n");
}
printf("***************************************************\n");
printf("Press 1. for back to home page\n");
printf("Press 2. for exit\n");
repeat:
printf("Choose option: ");
scanf("%d", &choose);
if (choose == 1)
{
printf("Home page\n");
}
else if (choose == 2)
{
exit(0);
}
else
{
printf("Invalid number try again\n");
goto repeat;
}
}
void filter_RAM()
{
int ram, choose;
printf("Enter RAM in GB: ");
scanf("%d", &ram);
printf("\n\t\tOnline mobile shopping\n");
printf("*************************************************\n");
printf("* Brand name RAM Price\n");
printf("*************************************************\n");
if (ram > 2 && ram < 7)
{
for (int i = 0; i < 5; i++)
{
if (ram == realme_ram[i])
{
printf("* %s %d %d\n", mobile_brand[0], realme_ram[i], realme_price[i]);
}
if (ram == oppo_ram[i])
{
printf("* %s %d %d\n", mobile_brand[1], oppo_ram[i], oppo_price[i]);
}
}
printf("**************************************************\n");
for (int i = 0; i < 5; i++)
{
if (ram == vivo_ram[i])
{
printf("* %s %d %d\n", mobile_brand[2], vivo_ram[i], vivo_price[i]);
}
if (ram == poco_ram[i])
{
printf("* %s %d %d\n", mobile_brand[3], poco_ram[i], poco_price[i]);
}
}
printf("**************************************************\n");
for (int i = 0; i < 5; i++)
{
if (ram == sum_ram[i])
{
printf("* %s %d %d\n", mobile_brand[4], sum_ram[i], sum_price[i]);
}
if (ram == nokia_ram[i])
{
printf("* %s %d %d\n", mobile_brand[5], nokia_ram[i], nokia_price[i]);
}
}
}
else
{
printf("Sorry! no result found\n");
}
printf("**************************************************\n");
printf("Press 1. for back to home page\n");
printf("Press 2. for exit\n");
repeat:
printf("Choose option: ");
scanf("%d", &choose);
if (choose == 1)
{
printf("Home page\n");
}
else if (choose == 2)
{
exit(0);
}
else
{
printf("Invalid number try again\n");
goto repeat;
}
}
void filter_Price()
{
int minPrice, maxPrice, choose;
printf("Enter Minimum Price: ");
scanf("%d", &minPrice);
printf("Enter Maximum Price: ");
scanf("%d", &maxPrice);
printf("\n\t\tOnline mobile shopping\n");
printf("*************************************************\n");
printf("* Brand name RAM Price\n");
printf("*************************************************\n");
if ((minPrice >= 8000 && minPrice <= 14550) && (maxPrice >= 8000 && maxPrice <= 14550))
{
for (int i = 0; i < 5; i++)
{
if ((realme_price[i] >= minPrice) && (realme_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[0], realme_ram[i], realme_price[i]);
}
if ((oppo_price[i] >= minPrice) && (oppo_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[1], oppo_ram[i], oppo_price[i]);
}
}
printf("**************************************************\n");
for (int i = 0; i < 5; i++)
{
if ((vivo_price[i] >= minPrice) && (vivo_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[2], vivo_ram[i], vivo_price[i]);
}
if ((poco_price[i] >= minPrice) && (poco_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[3], poco_ram[i], poco_price[i]);
}
}
printf("**************************************************\n");
for (int i = 0; i < 5; i++)
{
if ((sum_price[i] >= minPrice) && (sum_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[4], sum_ram[i], sum_price[i]);
}
if ((nokia_price[i] >= minPrice) && (nokia_price[i] <= maxPrice))
{
printf("* %s %d %d\n", mobile_brand[5], nokia_ram[i], nokia_price[i]);
}
}
}
else
{
printf("Sorry! no results found\n");
}
printf("**************************************************\n");
printf("Press 1. for back to home page\n");
printf("Press 2. for exit\n");
repeat:
printf("Choose option: ");
scanf("%d", &choose);
if (choose == 1)
{
printf("Home page\n");
}
else if (choose == 2)
{
exit(0);
}
else
{
printf("Invalid number try again\n");
goto repeat;
}
}
void filter_product()
{
int choose;
printf("\nWhat do you want to filter\n");
printf("Press 1 for Brand name\n");
printf("Press 2 for RAM\n");
printf("Press 3 for Price\n");
repeat:
printf("Choose option: ");
scanf("%d", &choose);
switch (choose)
{
case 1:
filter_Brand_Name();
break;
case 2:
filter_RAM();
break;
case 3:
filter_Price();
break;
default:
printf("invalid option try again\n");
goto repeat;
break;
}
}
void main()
{
char choose;
while (1)
{
printf("\n\t\t\t\t\tOnline mobile shopping\n");
printf("******************************************************************************************************\n");
printf("* Brand name RAM Price | Brand name RAM Price \n");
printf("******************************************************************************************************\n");
for (int i = 0; i < 5; i++)
{
printf("* %s %d %d %s %d %d \n",
mobile_brand[0], realme_ram[i], realme_price[i], mobile_brand[1], oppo_ram[i], oppo_price[i]);
}
printf("******************************************************************************************************\n");
for (int i = 0; i < 5; i++)
{
printf("* %s %d %d %s %d %d \n",
mobile_brand[2], vivo_ram[i], vivo_price[i], mobile_brand[3], poco_ram[i], poco_price[i]);
}
printf("******************************************************************************************************\n");
for (int i = 0; i < 5; i++)
{
printf("* %s %d %d %s %d %d \n",
mobile_brand[4], sum_ram[i], sum_price[i], mobile_brand[5], nokia_ram[i], nokia_price[i]);
}
printf("******************************************************************************************************\n");
repeat:
fflush(stdin);
printf("If you want to filter mobiles then press (Y) otherwise (N): ");
scanf("%c", &choose);
if (choose == 'Y' || choose == 'y')
{
filter_product();
}
else if (choose == 'N' || choose == 'n')
{
exit(0);
}
else
{
printf("Invalid character try again\n");
goto repeat;
}
}
}
project output :-
Online mobile shopping
******************************************************************************************************
* Brand name RAM Price | Brand name RAM Price
******************************************************************************************************
* realme 6 14000 oppo 3 9000
* realme 4 12000 oppo 6 14000
* realme 4 10000 oppo 4 11000
* realme 6 13000 oppo 6 12000
* realme 3 8000 oppo 4 9000
******************************************************************************************************
* vivo 4 12000 poco 4 10000
* vivo 6 14000 poco 3 8000
* vivo 3 8000 poco 4 9000
* vivo 6 13000 poco 6 12000
* vivo 4 10000 poco 3 7000
******************************************************************************************************
* sumsung 4 11000 nokia 3 8000
* sumsung 3 8000 nokia 4 11000
* sumsung 6 14550 nokia 6 13000
* sumsung 4 10000 nokia 4 10000
* sumsung 6 13000 nokia 6 12000
******************************************************************************************************
If you want to filter mobiles then press (Y) otherwise (N): y
What do you want to filter
Press 1 for Brand name
Press 2 for RAM
Press 3 for Price
Choose option: 2
Enter RAM in GB: 4
Online mobile shopping
*************************************************
* Brand name RAM Price
*************************************************
* realme 4 12000
* realme 4 10000
* oppo 4 11000
* oppo 4 9000
**************************************************
* vivo 4 12000
* poco 4 10000
* poco 4 9000
* vivo 4 10000
**************************************************
* sumsung 4 11000
* nokia 4 11000
* sumsung 4 10000
* nokia 4 10000
**************************************************
Press 1. for back to home page
Press 2. for exit
Choose option: 2
4.project explanation video :-
दोस्तों अगर आपको अभी भी यह प्रोजेक्ट अच्छी तरह समझ नहीं आया है तो आप हमारी यह वीडियो you tube पर देख सकते है जिसमें हमने इस प्रोजेक्ट को अच्छी तरह से समझाया है और इस प्रोजेक्ट को रन करके भी दिखाया है तो अगर आप इस वीडियो को देखना चाहते है तो यहाँ पर क्लिक करें।
इन पोस्ट को भी पढ़े -
Author :- तो दोस्तों अब हमारी यह C project to filter item like shopping website in Hindi | with source code पोस्ट ख़त्म होती है। हम आशा करते है की आपको हमारी यह पोस्ट जरूर पसंद आई होगी और आप item को filter करने का project अच्छी तरह समझ गए होंगे। तो दोस्तों आज के लिए बस इतना ही फिर मिलेंगे ऐसी ही किसी और मज़ेदार पोस्ट में तब तक के लिए अलविदा !
0 Comments
Do not enter any spam comments please.