Computer Science Questions and Answers

Recent Questions :: Computer Science

5004 QuestionsPage 3 of 501.

Find the Error Part in the Given Declaration

Find errors if any, in the following declaration statements:
Int x;
float length, HEIGHT;
double =p,q;
character C1;
final int TOTAL;
final pi=3.142;
long int m;

Asked by: Arif on Jul 8, 2020.

Write a Program for a DESCENDING TRIANGLE


Given an input 'n', write a program to print the triangle as shown in the sample output.

Input Format:
Input consists of a single integer.

Output Format:
Refer sample output for formatting specifications.

Sample Input and Output:

[All text in bold corresponds to input and the rest corresponds to output]

Enter the number of rows







Asked by: Mohan on Jun 15, 2020.

Design an Algorithm for the Chosen Solution

One of the jobs that Joe Roberts has been given at work is to order special paper for a report for a board meeting. The paper comes in reams of 500 sheets. He always makes five more copies than the number of people that will be there. Joe wants to know how many reams of paper he needs for a meeting. He can order only whole, not partial, reams. Assume the required number of pages will not equal an exact number of reams. Test your solution with the following data: The report is 140 pages long. There will be 25 people at the meeting. Construct the Input-Processing-Output (I.P.O.) Chart for the chosen solution. Design an algorithm for the chosen solution. Draw the flowchart for the chosen solution

Asked by: Prince on May 9, 2020.

Write a java(eclipse) Program for the Given Output

Write a java(eclipse) Program and print the following output.

5 5 5 5 5
* * * *
3 3 3
* *
* *
3 3 3
* * * *
5 5 5 5 5

Asked by: Maria on Apr 1, 2020.

Write a Program to Create a Structure

Write a program that will create a structure called cricketInfo and it will contain two members: teamName and battingAverage. Your program will take input for 3 teams and their batting averages. Then you will search for a specific team. According to your search result, it will give you the batting average of that team.

Asked by: Khurshid on Mar 31, 2020.

Program to Display all the Prime Numbers Between 1 to 100

A prime number is an integer greater than one and divisible only by itself and one. The first seven prime numbers are 2, 3, 5, 7, 11, 13, and 17. Write a program that displays all the prime numbers between 1 and 100.

Asked by: Natty on Mar 13, 2020.

C++ Program for Menu Driven Inventory Management System Software

Write a Program in C++ to Write a Menu Driven Inventory Management System Software.

Write a program in c++ to write a menu driven inventory management system software to have the facilities and new items, purchase and sale of items, query the item, item stock report and item transaction report. The accepted details must be stored in necessary data files.

1. When "Add new items " is selected, give the item number automatically (serial number starting from 1). Also enter the item name, company name, grade, unit price and stock in hand(quantity). Item name, company name should not be blank. Unit price and stock in hand should not be negative.

2. When making the purchase or sale, provide a facility to accept the item number. Display the corresponding item name, company name,Unit price and stock in hand. Enter the transaction type (p for purchase and S for sale), date of transaction(should be the system date). Transaction rate (for sale automatic 10% more than the item unit price) and transaction quality. Also update item file to make necessary changes in unit price (latest purchase rate must be the item unit price) and stock in hand after each purchase or sale.

3. When required, to identify the item stock, the rate of item etc. ( Query) enter the item name, display corresponding item number, company name, unit price and stock in hand from item file.

4. When any changes to be made in the item name, company name or item rate. Make a provision to edit the item information.
5. Generate item stock report containing item number, item name, company name, grade, unit price, stock in hand and stock value. Also, display the number of items at the end of the report.

6. Generate the transaction report by accepting the item number, display the item name, company name, grade, unit price, and stock in hand at the top and display the details of the transaction with the transaction date, transaction type, transaction rate, transaction quantity and amount.
Sir please send the code to my g mail. because I got a project on it. please as early as possible

Asked by: Vishwas Prabhu on Jan 31, 2020.

Monitoring the Large Consolidated Databases

How do you monitor these large consolidated databases? Tools, key metrics, decision impacts?

Asked by: Seun on Jan 28, 2020.

Query to Fetch Unique Values of DEPARTMENT

Write a query to fetch unique values of DEPARTMENT from the worker table.

Asked by: Amrit on Jan 18, 2020.

Write a function in C to calculate the F-score of of a Given Array

The F-score of an array of integers is calculated as follows:

For each integer in the array, the F-score is 2 if the last digit or the second-last digit of the integer is divisible by 4, or 3 if both the last and second-last digits are divisible by 4, and 0 if none of those digits are divisible by for.

Here second-last digit means the digit in the tens place.
The F-score is never more than 3.
For example: 138 scores 2, 142 scores 2, 32148 scores 3, and 17322 scores 0.
The total F-score of an array is simply the sum of the F-scores of all the integers in the array.
For example: the array {138, 142, 32148, 17322} will score 2+2+3+0 = 7.
If an integer does not have a second-last digit, it is assumed to be 0 (which is divisible by 4).

Write a function in C which calculates the F-score of of a given array. The prototype of the function should be as follows:

int array_score(int a[], int len);

Asked by: Pooja on Jan 13, 2020.

Sponsored Links

Current Affairs

Quick Links