Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Diamond

Given an integer value

N, write a program to print a number diamond of 2*N -1 rows as shown below.Input

The first line of input is an integer

N.Explanation

In the given example, the number of rows in the diamond is

5.So, the output should be

....0....

...000...

..00000..

.0000000.

000000000

.0000000.

..00000..

...000...

....0....


Let G(x) = x5 + x4 + x2 + 1 be the polynomial generator(pattern), T = 101000110101110 be the message received by the destination node. Would the receiver accept the message? Why?


In a bank there are two types of transactions: credit and debit. All transactions are assigned an alphabetical ID. Credit transactions are assigned a vowel and debit transactions are assigned a consonant. To track transactions over a year, all the transaction IDs are combined to form a string of IDs for each customer. A customer wishes to know the number of times he made a debit transaction immediately after a credit transaction.

Write an algorithm to print the count of debit transactions that were made immediately afte a credit transaction for that particular customer.

Input

The first line of the input consists of a string userString, representing the string of transaction IDs.

Output

Print an integer representing the count of det transactions made immediately after a credit transaction

Write a program that accepts dates written in numerical form and outputs in complete form


class List{

public:

int item;

int pos;

List* nextNode;

};


Task:

1)create the following functions

void Insert_Element_at(int X, int pos),

bool Delete_Element(int X),

bool is_Empty()

void Empty_List(),

void Copy_List(…)

2)Call the functions in main by makeing menu for them using switch_case statement and while loop.


Digit 9

You are given

N as input. Write a program to print the pattern of 2*N - 1 rows using an asterisk(*) as shown below.Note: There is a space after each asterisk * character.Input

The first line of input is an integer

N.Explanation

In the given example,

N = 4.So, the output should be


* * * *

* *

* *

* * * *

*

*

* * * *


Sample Input 1

4

Sample Output 1

* * * *

* *

* *

* * * *

*

*

* * * *

Sample Input 2

5

Sample Output 2

* * * * *

* *

* *

* *

* * * * *

*

*

*

* * * * *




Write a C++ program to check for the not-eligible donor by throwing a custom exception.

The class Donor has the following protected variables. 

Data TypeVariablestringnameintageintweightstringbloodGroup

 

In the Donor class, define the following function.

MethodDescriptionbool validateDonor(Donor donor)This method validates donor eligibility. Validate the donor details with the following conditions.

1.Age must be greater than 30 then the donor is eligible.

2.If the age is less than 30 then throw an exception and check the weight should be greater than 44 kg in catch block,

If the weight is also less than 44 then the donor is not eligible and rethrow the exception to the main method.

If the weight is greater than 44 then the donor is eligible.

 

In the Main method, read the donor details from the user and create corresponding objects.

Validate the donor to check the donor is eligible or not.



 


Let G(x) = x5

+ x4

+ x2

+ 1 be the polynomial generator(pattern), T =

101000110101110 be the message received by the destination node. Would the

receiver accept the message? Why?

Create a program that takes in a student’s full names and marks for 3 In-class exercises, then calculate the average of this marks. This average mark is then categorized as follows: Marks obtained Grade Level Message 80 – 100 1 Magnificent!! 70 – 79 2 Excellent!! 60 – 69 3 Good work!! 50 – 59 4 Good!! 2 DUE DATE: MONDAY 06 OCTOBER 2021 BEFORE 23h59 0 – 49 0 Fail – Try again next Year!! Greater than 100 or less than 0 X Invalid Marks!!, Marks too high. Or Invalid Marks!!, Negative marks not allowed. Sample run 1: Enter student full names: Goodluck Johnathan Enter 3 marks separated by spaces: 78 94.6 88 Output: Student name: Goodluck Johnathan Grade Level: 1 Comment: Magnificent!! Sample run 2: Enter student full names: Ellen Johnson Sirleaf Enter 3 marks separated by spaces: 200 104.87 99.9 Output: Student name: Ellen Johnson Sirleaf Grade Level: X Comment: Invalid Marks!!, Marks too high.


Create a program that takes in two words, check for equality ignoring the cases, if the words are equal the print the word in upper case with an appropriate message however if the words are different then print the two words in lower case with an appropriate message. Sample run 1: Enter two words separated by spaces: Welcome WELCOME Output: You have only entered one word: “WELCOME” Sample run 2: Enter two words separated by spaces: NUST Students Output: You have entered two words: “nust” and “students”


LATEST TUTORIALS
APPROVED BY CLIENTS