In a university, there is a certain system of credits. Each of student is given a ‘credit limit’ which specifies the maximum credits of a subject they can take. A student can take any number of subjects which are under his/her credit limit.
There are N students and K subjects.Each subject has a specified number of credits .when student choose a subject ,it becomes a (student,subject)pair.
Find the maximum number of possible(subject,student)pairs for the given credit limits and subject credit requirements.
A local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two dimensional 3 × 7 array, where each row represents a different monkey and each column represents a different day of the week. The program should first have the user input the data for each monkey. Then it should create a report that includes the following information: I. Average amount of food eaten per day by the whole family of monkeys. II. The least amount of food eaten during the week by any one monkey. III. The greatest amount of food eaten during the week by any one monkey. Input Validation: Do not accept negative numbers for pounds of food eaten.
Write a program that will predict the size of a population of red ants. The program should ask the user for the starting number of red ants e.g. 2,000,000, their average daily population increase as a percentage of current population e.g., 5%, and the number of days they will multiply e.g. 10 days. Use a do while to display the size of the population for each day. Draw a flow chart and write down a pseudo code before attempting this number. Input Validation: Do not accept a number less than two for the starting size of the population. Do not accept a negative number for average daily population increase. Do not accept a number less than one for the number of days they will multiply.
you are given a secret string and you are given a guess is string. both staying have exactly 5 characters. assume that each letters occurs at most one time in the secret string and guess string. some of the letters in the gas is string occurs in the same position as the secret string. call the number of such letters as i. some other letters in the guess string occurs in the secret but in some other position. call the number of such latter as j. you have to output (#)
you are given a 3x3 matrix of positive integers.You have to determine whether some row is a positive interger multiple of another. If row i is an interger multiple of row j then you have to output p#q where p is the minimum of (i,j) and q is the maximum of (i,j). If there are multiple possibilities for i and j, you have to print for smallest i and the smallest j. Otherwise, you have to output 0#0
Write a C program to sort the digits of an integer in ascending and descending order using pointers.
Note:
Enter an integer
print the integer in ascending and descending order
For example:
Test Input Result
1 54387 34578
87543
Suppose you are given a sequence of numbers as follows I, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. .Now. you want to find the n number of the sequence i.e.. if you input n-7, program will give you output 13, for n=10, output=55. You MUST use dynamic programming technique to solve this problem and implement your solution in C language. What is the running time of your algorithm (write it in your text file).
Suppose you are given a sequence of numbers as follows 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. .Now. you want to find the n number of the sequence i.e.. if you input n-7, program will give you output 13, for n=10, output=55. You MUST use dynamic programming technique to solve this problem and implement your solution in C language. What is the running time of your algorithm (write it in your text file).
Suppose you are given 1000 unordered integer numbers ranging from 10-100. Now you have to sort these numbers decreasing order. Implement a suitable sorting algorithm which would take lesser time in C language. Your program would take these 1000 numbers from the user and gives output of these 1000 numbers but in sorted order. Write a short note on why you have chosen your algorithm to solve this problem.