C/C++ 编程辅导

C/C++程序辅导 辅导C/C++编程作业

几道初级c语言作业代写

Read carefully: Plagiarized assignment will get a ZERO. You cannot change the variable names of other

student’s solution and submit it as yours. The program structure of other students must not match yours.

You are not allowed to collaborate with other students in solving this assignment. Every student has to

come up with his/her own solution. If you have any questions, you must talk to the lab instructor. Any

cheating (e.g. copying from internet) is a serious violation of the University student code and will be dealt

with very seriously.

Instructions for submission: Add the following to your .c file: (1) your full name (2) Algorithm

(3) Comments are must and they should be brief.

Problem 1 (10 points):

Write a program with a while loop to print 1 to N in square brackets. N is an integer input from

the user.

(i) Write the same program using a for-loop

(ii) Write the same program that will display only the even numbers and odd numbers

Example of Output (Expected output as well):

from 1 to N.

Pro

C++ code optimiaztion via gprof and gcov

CS作业代写

Due date: April 2, in class

Read about the linpack benchmark at

http://www.netlib.org/utk/people/JackDongarra/faq-linpack.html

Download the (slightly modified) file linpack.c from

http://www.cas.mcmaster.ca/~nedialk/COURSES/3f03/private/linpack.c

When running this benchmark on a 2.66GHz Dual-Core Intel Xeon, I obtain this table (MFLOPS

is million floating-point operations per second):

n max MFLOPS compiler flags

100 329.813 gcc

1000 410.306

330.914 -O0

931.276 -O1

930.425 -O2

1276.764 -O3

408.111 -O0

1208.931 -O1

1220.399 -O2

1619.045 -O3

Problem 1 (6 points) Study the compile options of the gcc compiler, and in particular the

optimization flags, and the flags that are related to SSE instructions.

Produce the same table for each of penguin, mills, and your own computer. Keep the same

flags as above, but you can also add other flags. Try to obtain as high count as you can. Submit

the three tables and a discussion on your results.

Note. You can obtain information about your system

四道 C++ 程序代写

Problem #1 (25 points)

Note that no global variables and data are allowed. All methods (as if you need them) must be

written explicitly and no library/package methods are allowed.

1. Write a function named as extractMostSeenEvenDigitProblem1YourName(),

which will

i. Receive an integer as argument; and

ii. Search and display the digits as shown in the output below; and

iii. Return the digit that has the largest occurrence.

1. A sample a program with main() would produce the sample output below – Your code must

take care of other possible output scenarios as well.

*********************************************************

* MENU *

* 1. Calling extractMostSeenEvenDigitProblem1YourName() *

* 2. Quit *

*********************************************************

Select an option (1 or 2): 1

Enter an integer: 302480443

Calling displayDigitProblem1YourName() –

There is/are 9 digit(s) with 4 even digit(s).

With the 4 even digits,

4 occurs 3 time(s)

0 occurs 2 time(s)

2 occurs 1 time(s)

8 occurs 1 t

unmanned lawn mowers c程序代写

代写c程序 二维数组 指针 内存申请与释放

dfs recrusive 遍历所有路径

// ~ Overview ~ //

This exercise will familiarize you with 2-dimensional arrays and
some more file operations.

// ~ Learning Goals ~ //

(1) To learn to perform file operations
(2) To learn to create and manipulate 2-dimensional arrays using
malloc and free function.
(3) To apply recursion to solve a maze traversal problem
// ~ Submitting Your Assignment ~ //

You must submit one zip file to blackboard. This zip file must
contain:

(1) pa_answer02.c
(2) pa02.c

You create the zip file using the following command.

> zip pa02.zip pa_answer02.c pa02.c

// ~ Overview ~ //

This exercise will give you more practice with file operations,
memory allocation, and recursion.

You own a business that performs mowing using unmanned lawn mowers
(ULM). Suppose you have just agreed to a contract to provide mowing
service to a corn maze operator. Based on a pre-processed satellite
images of corn maze, where the walls of the corn maze are stored as ‘X’ and
the paths are store

c语言扫雷游戏 minesweeper实现

minesweeper C 程序代写

1. (Time: 2 – 3 hours) For your final project you will be implementing the computer

game minesweeper. The game of minesweeper works as follows:

1. There is a rectangular grid of tiles

2. Hidden under some of the tiles are mines

3. Your goal is to mark all the tiles that contain mines and uncover all the tiles

4. If you uncover a tile that contains a mine you lose the game

5. If you uncover a tile that doesn’t contain a mine, it tells you how many mines

that don’t contain mines

are hidden in the eight surrounding squares

Here are some example boards with all of their contents revealed so that you can get an

idea as to what they look like.

Example 1:

2 * * 2 0

1 5 * 3 0

0 * * 2 0

0 1 2 3

Example 2:

9 0 0 0 0 0 1 1 1 0 0

8 0 0 0 0 0 1 * 1 0 0

7 0 1 1 1 0 1 1 2 1 1

6 0 1 * 1 1 1 1 1 * 1

5 0 1 1 1 1 * 1 1 1 1

4 1 1 1 0 1 1 1 0 0 0

3 1 * 1 0 0 0 0 0 0 0

2 1 1 1 0 0 0 0 0 0 0

1 1 2 1 1 0 1 1 2 2 2

0 * 2 * 1 0 1 * 2 * *

0 1 2 3 4 5 6 7 8 9

Requirements

1. Name your exe

CSCI 1113 Homework 5 代写

C++程序代写,mergesort 对结构体排序,function pointer

Problem A) (20 Points) Program to compute the numeric grades for a course.

Assume the course records for a particular course are in a file named: “Grades.dat” that will

serve as the input file for your program. The input file is in exactly the following format. Each

line contains a student’s last name, then one space, then the student’s first name, then one

space, then five quiz scores. The quiz numbers are whole numbers and are separated by one

space.

For example, one entry in the file “Grades.dat” is as follows:

Svelt Sam 90 80 90 100 85

Your program will take its input from the file “Grades.dat” its output to a second file named:

“FinalGrades.dat”. The data in the output file will be the same as the data in the input file

except that you will add one additional number at the end of each line. The number will be the

average of the students quiz scores.

For example, the following two entries are in the output file “FinalGrades.dat”:

Svelt Sam 90 80 90 1

bin_str 递归调用

输出所有二进制组合,递归调用,c程序代写

  1.  bin_str.c

binary number is made up of 0’s and 1’s but the input strings you will receive can also contain ‘x”s. An x represents a digit that can be either a 0 or a 1. Your program should display all the possible binary digits that can be formed. For example the string x1x0 could represent either 0100, 0110, 1100, or 1110.

  1. Name your executable bin_str.out
  2. Your program should accept the binary string as a command line argument
  3. You MUST solve this program RECURISIVELY
  4. Examples

    1../bin_str.out 0110 0110

    2../bin_str.out 01×0 0100

    0110 3../bin_str.out xx

    00 01 10 11

minutes) Write a program called bin_str.c that completes a binary number. A

fibanocci with one RECURSIVE CALL only

通常fibanocci要两个递归调用  复杂度o(2^n)

但是用指针的话,可以只用1次call   复杂度 o(n)

(10 minutes) Write a program called fib.c that calculates the nth fibanocci

number. The equation for the Fibonacci numbers is defined as follows:

Fib(0)=0

1.
Fib(N)=Fib(N−1)+Fib(N−2)

  1. Name your executable fib.out
  2. Your program should accept N as a command line argument
  3. You MUST solve this program RECURSIVELY
  4. Unlike the example in class, you may only have ONE RECURSIVE CALL in

    your function

    1. Hint pointers help make this possible.

  5. Here are the first 100 numbers in the Fibonacci sequence
  6. Examples

    1../fib.out 0
    The 0th fibanocci number is 0.

    2../fib.out 1
    The 1th fibanocci number is 1.

    3../fib.out 10
    The 10th fibanocci number is 55.

c语言作业hw5

帮助代写程序,实现wcount.c, perimeter.c, tail.c

Homework 5 Files to submit: wcount.c, perimeter.c, tail.c, ReadMe.txt

  • All programs must compile without warnings when using the -Wall option
  • If you are working in a group ALL members must submit the assignment on SmartSite
  • Submit only the files requested◦ Do NOT submit folders or compressed files such as .zip, .rar, .tar, .targz, etc
  • All output must match the provided solution in order to receive credit◦ We use a program to test your code so it must match exactly to receive credit
  • All input will be valid unless stated otherwise
  • The examples provided in the prompts do not represent all possible input you can receive.Please see the Tests folder for each problem for more adequate testing
  • You may assume all inputs are valid unless otherwise specified
  • All inputs in the examples in the prompt are underlined

c语言作业hw4

代写

Homework 4
Files to submit: mat_add.c, all files need to compile connectn.out, a Makefile for connectn.out

  • All programs must compile without warnings when using the -Wall option
  • If you are working in a group ALL members must submit the assignment on SmartSite
  • Submit only the files requested◦ Do NOT submit folders or compressed files such as .zip, .rar, .tar, .targz, etc
  • All output must match the provided solution in order to receive credit◦ We use a program to test your code so it must match exactly to receive credit
  • All input will be valid unless stated otherwise
  • The examples provided in the prompts do not represent all possible input you can receive.Please see the Tests folder for each problem for more adequate testing
  • You may assume all inputs are valid unless otherwise specified
  • All inputs in the examples in the prompt are underlined