In a factory, different vehicles are being allocated different id. There are vehicles that have same ids as well because they have loaded same material and are of same model. At check post there are two list for maintaining the records of vehicle.
● In_list which consist of ids of vehicle that are present in factory.
● out_list contain the ids of vehicles that are about to come in factory.
Any vehicle from out_list will enter in factory when vehicle from In_list will go out of factory.Write a program that ask user vehicle id which will go out and delete that entry from In_list (if duplicate remove all entries and adjust array by back shifting as shown in example). Take next entry from the out_list and put in the In_list. Remember Out_list does not have any duplicate entries. Value from the out_list should be taken from index zero (then adjust array shown in example)
In_list
25
89
10
11
5
11
26
39
68
25
out_list
128
69
13
512
120
100
21
69
56
0
Write a program that initialize array of size 10, and prints all Armstrong and Palindrome numbers in array. Your program should ask user about their choice of printing. If user press ‘A’ or ‘a’ then program should display all Armstrong numbers in array and if user press ‘P’ or ‘p’ then it should display all Palindrome numbers in array.
6 nails, 4 glass pieces and 2 brass handles are required for one window. There are 'N' no. Of windows in a room and 'M' such room in my house , Write a program to calculate total no. Of nails,glasspieces and brass handles will be required
Write a program that initialize an array of size 10. Create a generic code to shift array left and right. Your program should be menu based, after each shifting show menu and array to user again and again.
Write a program that initialize array of size 10, and prints all Armstrong and Palindrome numbers in array. Your program should ask user about their choice of printing. If user press ‘A’ or ‘a’ then program should display all Armstrong numbers in array and if user press ‘P’ or ‘p’ then it should display all Palindrome numbers in array.
How to make a structure for a hospital with 30 members
How companies use the database for business? Mention at least 5 names of those companies.
Write a program that initialize array of size 10, and prints all Armstrong and Palindrome numbers in array. Your program should ask user about their choice of printing. If user press ‘A’ or ‘a’ then program should display all Armstrong numbers in array and if user press ‘P’ or ‘p’ then it should display all Palindrome numbers in array.
Each student can open an account in the cafeteria. It has the following features:
· The system can hold data for 20 students.
· The student can deposit any amount in his/her account.
· The student can use the available amount in his/her account to buy lunches or snacks.
· Menu price list is as below:
Item Cost in PKR
Lunch 150
Snack 100
Drink 50
· Each student account should have the following details stored:
1. Roll no (Data type: int, format: BBRRRR, e.g. 201406)
2. Account No (Data type: int)
3. Balance (Data type: double)
4. Student Name (Data type: char array)
{Hint: Use 2D arrays for storing student first and last names: char Student_Name [20][30]}
Functionality
1. Create_Account()
Assign each student a unique account number.
Get student Roll No and Name.
Ask the user for the initial Deposit amount.
2. Display()
Gives all details of a single Account.
3.Deposit_amount()
Updates the Account Balance.
4. Purchase_Item()
Following functionality must be implemented:
· Displays menu of available items for student to choose
· The student can select more than one item for purchase
· Updates the account balance if item can be purchased with the available amount, else notifies if amount balance is not sufficient
5. Store_in_File ()
Writes data of the accounts in use into a file “Record_sys.txt”
6.Display_Sorted()
Sort the entire data on the basis of Roll No. and display it in an ascending order
7. Read_from_file()
At the beginning of your program update all the previously saved data from the file “Record_sys.txt”
Create a code using a function to sort 10 double values. Allow the user to input the values.