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

Solve for the Greatest Common Divisor (GCD) of the following pair of numbers using the Pseudocode of Euclidean Algorithm given



below. (Show your complete solution.)



while n ≠ 0 do



r ← m mod n



m ← n



n ← r



return m




1. GCD (248, 16)

Solve for the Greatest Common Divisor (GCD) of the following pair of numbers using the Basic Euclidean Algorithm. (Show your complete solution.) 1. GCD (700, 105)


1. Write C++ program, overload the unary decrement operator (--) , postix nd prefix





2. Write C++ program , overload the binary subtraction operator(-)




Les assume you create a system which asks the user for the number of students and the

number of test scores per student. A nested inner loop, should ask for all the test scores for one

student, iterating once for each test score. The outer loop should iterate once for each student

and take student name as input. After taking input for 3 test scores, calculate average for each

student. Take 3 test scores and 4 students.

Note: use do-while loops


 Man's Best Friend

by CodeChum Admin

We all know what man's best friend is. A dog! 🐶


Let's create one in our program using the pre-existing struct Dog provided.



Instructions:

  1. In the code editor, you are provided with the definition of a struct Dog. This struct needs a string value for its breed. Furthermore, you are provided with a displayDog() function which accepts a struct Dog as its parameter.
  2. Your task is to create a Dog, take in a string user input, and then set it as the Dog's breed.
  3. Finally, call the displayDog() function and pass that Dog you created.

We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.



Care to do it for me?



Input


A line containing two integers seperated by a space



Output


A single line containing an integer


1

Create Class (PSL), having





1. Data items: M , W , L, T, P





2. Constructors: Defualt, Parameterized, Copy





3. Member functions: getdata(), setData(), showdata() const





4. Static class data: total number of teams (objects) created





5. Constant Object : e.g LQ







 Lets assume you create a system which asks the user for the number of students and the number of test scores per student. A nested inner loop, should ask for all the test scores for one student, iterating once for each test score. The outer loop should iterate once for each student and take student name as input. After taking input for 3 test scores, calculate average for each student. Take 3 test scores and 4 students.

Note: use do-while loops




A certain charity designates donors who give $10,000.00 or more as

Benefactors; those who give $1,000.00 or more but less than $10,000.00 as

Patrons; those who give $200.00 or more but less than $1,000.00 as Supporters;

those who give $15.00 but less than $200.00 as Friends; and those who give

less than $15 as Cheapskates.

Write a program containing a nested if-else statement (or statements) that,

given a keyboard input with the amount of a contribution, outputs the correct

designation for that contributor.

Here’s an example that illustrates what your program should look like in

action:

~/ python donor.py

Enter the amount of a contribution: $5.20

Cheapskate!

Test your program also for the input values: 10000.00, 1000.00,

999.99, 12200.00,15.00, 499.99, 2200.00, 199.99, 75.33

An appropriate error message should be output (and your program should halt) when

an amount less than 0 is input.


Consider a scenario where a “Class A” network is divided into 7 subnets of fixed length.


Design each subnet and find the IP Range and subnet mask of each subnet. (Choose any class-


A address). (5 marks)


Q3.2: A sender needs to send the two data items 010011 and 010110, find the checksum at


sender and receiver to check if there is any error or not? (5 marks)

LATEST TUTORIALS
APPROVED BY CLIENTS