Write a c++ program to display the Fibonacci series of the first 50 integer numbers.
Write a c++ program to compute the results of five HND 1 students taking all the first semester courses displaying their number,course title and grades.
Given an integer n (between 1 and 104) find two prime numbers (possibly same) p1,p2 such that p1+p2=n
In case there are multiple solutions, you can output any of them.
If there is no solution, then print -1 -1 instead.
Consider you are working as a developer in a software house “XYZ” and you have to develop a program that will detect the Real time objects by using the Camera. As a developer, you have to decide which programming paradigm would be feasible to design develop this system.
Identify the programming paradigm from the list given below and justify your answer with proper reasons.
Object Oriented Programming Paradigm
Procedural Programming Paradigm
Instructions:
1. You need to provide precise and to the point answer, avoid irrelevant details.
2. Material that is copied from the internet or another student will get zero marks.
3. You cannot participate in the discussion after the due date via email.
4. The GDB will open and close on specified date and time. Please note that NO grace day or extra time will be given for posting comments on GDB.
You are given an array of N non-negative integers: A1, A2, ..., AN. An alternating subsequence is a subsequence in which the indices of any two consecutive elements differ by exactly two in the original array. That is, if Ai1, Ai2, ..., Aik is some subsequence, then for it to be an alternating subsequence, (i2 - i1 = 2), (i3 - i2 = 2), and so on should all hold true. Among all alternating subsequences, find the one which has maximum sum of elements, and output that sum.
Input
The first line of the input contains an integer T denoting the number of test cases.
The first line of each test case contains an integer N denoting the number of elements in the array.
The second line contains N space-separated integers A1, A2, ..., AN denoting the array A.
Output
For each test case, output a single line containing the answer.
Note
A subsequence with only a single integer is also an alternating subsequence.
Constraints
1 ≤ T ≤ 10
1 ≤ N ≤ 105
0 ≤ Ai ≤ 105
An election is contested by 5 candidates. The candidates are numbered 1 to 5 and the voting is done by marking the candidate number on the ballot paper. Write a program to read the ballots and count the votes cast for each candidate. Create custom exception to find invalid age of voter
Design a class to represent a Employee details. Include the following members.
Data Members • Employee Name • Employee ID • Department Name •Basic Salary. Methods • To assign initial values • compute Net salary * print employee details. To Incorporate a constructor to provide initial values and array of objects.
Write a program in C++ that uses a structure to store the following product data in a file (File
Name: product.txt):
Product ID
Product Name
Quantity
Wholesale Cost
Retail Cost
Date Added to Product
The program should have a menu that allows the user to perform the following tasks:
• Add new records to the file.
• Display any record in the file.
The program should calculate and display the following data:
• The total wholesale value of the product
• The total retail value of the product
Input Validation: The program should not accept quantities, or wholesale or retail costs, less
than 0. The program should not accept dates that the programmer determines are unreasonable.
Instructions:
Sample:
Enter a small letter: a
Uppercase = AEnter a small letter: f
Uppercase = FWrite pseudo code for the problem of printing odd numbers less than a given number it should also calculate their sum and count