#include <stdio.h>
int main(int argc, char *argv[])
{
char choise;
int n = 0;
do {
puts("read details about n products (type 1) \t search product by
id (type 2)\t"
" search product by category (type 3) \t "
"display products whose price is greater than Rs.500 (type
4) \t"
"Quit (type q or Q)");
scanf("%c", &choise);
if (choise == '1')
{
puts("Enter n: ");
scanf("%d", &n);
for(int i = 0; i<n; i++){
//read details about n products
}
}
else
if (choise == '2')
{
//search product by id and display, if found
}
else
if (choise == '3')
{
// search products by category and display all, if
found
}
else
if (choise == '4')
{
//display products whose price is greater
than Rs.500
}
else
if (choise == 'Q' || choise == 'q')
{
puts("Bye!"); //exit message
break;
}
} while (1);
return 0;
}
https://www.AssignmentExpert.com</stdio.h>