Ece 175: computer programming for engineering applications

ECE 175: Computer Programming for Engineering Applications

Homework Assignment 7

Conventions: Name your C programs as hwx py.c where x corresponds to the homework number and y corresponds

to the problem number. As an example the C program for hw1 problem 1 should be named as hw1 p1.c. Write

comments to your programs. Programs with no comments will receive PARTIAL credit. At each program you turn

in at least the following info should be included

– Author:

– Date created:

– Brief (two-line) description of the program:

Submission Instructions: Use the dropbox on D2L to submit only the .c les.

Problem 1: The les in sudoku.zip contain integer values for Sudoku puzzles (two dimensional integer arrays with

9 rows and 9 columns). Write a program that reads a sudoku le as input and prints out if the le is a proper

solution to the Sudoku puzzle.

For the rules of Sudoku, check Wikipedia: http://en.wikipedia.org/wiki/Sudoku.

Example of a correct Sudoku puzzle:

1 2 3 4 5 6 7 8 9

4 5 6 7 8 9 1 2 3

7 8 9 1 2 3 4 5 6

2 3 4 5 6 7 8 9 1

5 6 7 8 9 1 2 3 4

8 9 1 2 3 4 5 6 7

3 4 5 6 7 8 9 1 2

6 7 8 9 1 2 3 4 5

9 1 2 3 4 5 6 7 8

Problem 2: Insertion Sort is a sorting algorithm that moves the elements of an array to their correct position

one element at a time. The following example shows the steps for sorting array data= [3, 7, 4, 9, 5, 2, 6, 1]. In

each step, the item under consideration is underlined. The array before the underlined element is already sorted

while the array after the underline element is unsorted. The item that is moved (or left in place because it was the

biggest yet considered) to the correct position within the sorted part of the array. The new position of the element

that was moved in the previous step, appears in bold in the next step.

3 7 4 9 5 2 6 1

3 7 4 9 5 2 6 1

3 7 4 9 5 2 6 1

3 4 7 9 5 2 6 1

3 4 7 9 5 2 6 1

3 4 5 7 9 2 6 1

2 3 4 5 7 9 6 1

2 3 4 5 6 7 9 1

1 2 3 4 5 6 7 9

1

Develop C code that would implement the Insertion Sort algorithm. Your code should use the following functions

void insertion(int x[ ], int size)

void print ar(int x[ ], int size)

void swap(int *a, int *b)

The last two functions are already provided in the class notes.

Submit your .c les named hw7 p1.c and hw7 p2.c via D2L dropbox

2

Calculate the price of your order

Select your paper details and see how much our professional writing services will cost.

We`ll send you the first draft for approval by at
Price: $36
  • Freebies
  • Format
  • Formatting (MLA, APA, Chicago, custom, etc.)
  • Title page & bibliography
  • 24/7 customer support
  • Amendments to your paper when they are needed
  • Chat with your writer
  • 275 word/double-spaced page
  • 12 point Arial/Times New Roman
  • Double, single, and custom spacing
  • We care about originality

    Our custom human-written papers from top essay writers are always free from plagiarism.

  • We protect your privacy

    Your data and payment info stay secured every time you get our help from an essay writer.

  • You control your money

    Your money is safe with us. If your plans change, you can get it sent back to your card.

How it works

  1. 1
    You give us the details
    Complete a brief order form to tell us what kind of paper you need.
  2. 2
    We find you a top writer
    One of the best experts in your discipline starts working on your essay.
  3. 3
    You get the paper done
    Enjoy writing that meets your demands and high academic standards!

Samples from our advanced writers

Check out some essay pieces from our best essay writers before your place an order. They will help you better understand what our service can do for you.

Get your own paper from top experts

Order now

Perks of our essay writing service

We offer more than just hand-crafted papers customized for you. Here are more of our greatest perks.

  • Swift delivery
    Our writing service can deliver your short and urgent papers in just 4 hours!
  • Professional touch
    We find you a pro writer who knows all the ins and outs of your subject.
  • Easy order placing/tracking
    Create a new order and check on its progress at any time in your dashboard.
  • Help with any kind of paper
    Need a PhD thesis, research project, or a two-page essay? For you, we can do it all.
  • Experts in 80+ subjects
    Our pro writers can help you with anything, from nursing to business studies.
  • Calculations and code
    We also do math, write code, and solve problems in 30+ STEM disciplines.

Frequently asked questions

Get instant answers to the questions that students ask most often.

See full FAQ
    See full FAQ

    Take your studies to the next level with our experienced specialists

    WhatsApp
    Hello, Send us a message or inquiry, and we will respond right away