文件名称:Assignment_1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:242.89kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Exercise 1: cryptarithm_array.c (2.5 marks).
A cryptarithm is a puzzle where digits have to be assigned to the letters of some words, dierent
letters being assigned dierent digits, and no word starting with 0, such that a number of conditions
are satised, that are naturally related to the meanings of the words when the words do have a
meaning. The program sample_cryptarithm_array.c that comes with this assignment provides
you with an example of a cryptarithm, solved using an array-based technique, where the task is to
assign digits to the letters in three, four and eight, in such a way that:
none of the leading digits is 0
three is prime
four is a perfect square
eight is a perfect cube
It has a unique solution, namely, 42611 for three, 7056 for four, and 13824 for eight (so t is assigned
the digit 4, h is assigned the digit 2, etc.-Aims: The purpose of the assignment is to
let you design solutions to simple problems
let you implement these solutions in the form of short C programs
let you study existing code and take advantage of it to design solutions to your problems and
write your own code
practice the use of arithmetic computations, tests and repetitions
make use of arrays
make use of the internal representation of data
compare alternative approaches to a given problem.
A cryptarithm is a puzzle where digits have to be assigned to the letters of some words, dierent
letters being assigned dierent digits, and no word starting with 0, such that a number of conditions
are satised, that are naturally related to the meanings of the words when the words do have a
meaning. The program sample_cryptarithm_array.c that comes with this assignment provides
you with an example of a cryptarithm, solved using an array-based technique, where the task is to
assign digits to the letters in three, four and eight, in such a way that:
none of the leading digits is 0
three is prime
four is a perfect square
eight is a perfect cube
It has a unique solution, namely, 42611 for three, 7056 for four, and 13824 for eight (so t is assigned
the digit 4, h is assigned the digit 2, etc.-Aims: The purpose of the assignment is to
let you design solutions to simple problems
let you implement these solutions in the form of short C programs
let you study existing code and take advantage of it to design solutions to your problems and
write your own code
practice the use of arithmetic computations, tests and repetitions
make use of arrays
make use of the internal representation of data
compare alternative approaches to a given problem.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Assignment_1/
Assignment_1/ass1.files/
Assignment_1/ass1.files/3285287.outputs.txt
Assignment_1/ass1.files/3285287.results.txt
Assignment_1/ass1.files/commands_and_expected_outputs.txt
Assignment_1/ass1.files/cryptarithm_array.c
Assignment_1/ass1.files/cryptarithm_bits.c
Assignment_1/ass1.files/division.c
Assignment_1/ass1.files/multiplication.c
Assignment_1/assignment1.pdf
Assignment_1/assignment_checklist.pdf
Assignment_1/myassigment/
Assignment_1/myassigment/cryptarithm_array.c
Assignment_1/myassigment/cryptarithm_array.c~
Assignment_1/myassigment/cryptarithm_array.exe
Assignment_1/myassigment/cryptarithm_array.o
Assignment_1/myassigment/cryptarithm_bits (2).c
Assignment_1/myassigment/cryptarithm_bits.c
Assignment_1/myassigment/cryptarithm_bits.c~
Assignment_1/myassigment/cryptarithm_bits.c~RF5260f5.TMP
Assignment_1/myassigment/cryptarithm_bits.exe
Assignment_1/myassigment/cryptarithm_bits.o
Assignment_1/myassigment/cryptarithm_bits2.c
Assignment_1/myassigment/cryptarithm_bits2.exe
Assignment_1/myassigment/cryptarithm_bits2.o
Assignment_1/myassigment/division.c
Assignment_1/myassigment/division.c~
Assignment_1/myassigment/division.exe
Assignment_1/myassigment/division.o
Assignment_1/myassigment/MFCB14C.tmp
Assignment_1/myassigment/multiplication.c
Assignment_1/myassigment/multiplication.c~
Assignment_1/myassigment/multiplication.exe
Assignment_1/myassigment/multiplication.o
Assignment_1/myassigment.rar
Assignment_1/sample_cryptarithm_array.c
Assignment_1/sample_cryptarithm_bits.c
Assignment_1/sample_multiplication.c
Assignment_1/ass1.files/
Assignment_1/ass1.files/3285287.outputs.txt
Assignment_1/ass1.files/3285287.results.txt
Assignment_1/ass1.files/commands_and_expected_outputs.txt
Assignment_1/ass1.files/cryptarithm_array.c
Assignment_1/ass1.files/cryptarithm_bits.c
Assignment_1/ass1.files/division.c
Assignment_1/ass1.files/multiplication.c
Assignment_1/assignment1.pdf
Assignment_1/assignment_checklist.pdf
Assignment_1/myassigment/
Assignment_1/myassigment/cryptarithm_array.c
Assignment_1/myassigment/cryptarithm_array.c~
Assignment_1/myassigment/cryptarithm_array.exe
Assignment_1/myassigment/cryptarithm_array.o
Assignment_1/myassigment/cryptarithm_bits (2).c
Assignment_1/myassigment/cryptarithm_bits.c
Assignment_1/myassigment/cryptarithm_bits.c~
Assignment_1/myassigment/cryptarithm_bits.c~RF5260f5.TMP
Assignment_1/myassigment/cryptarithm_bits.exe
Assignment_1/myassigment/cryptarithm_bits.o
Assignment_1/myassigment/cryptarithm_bits2.c
Assignment_1/myassigment/cryptarithm_bits2.exe
Assignment_1/myassigment/cryptarithm_bits2.o
Assignment_1/myassigment/division.c
Assignment_1/myassigment/division.c~
Assignment_1/myassigment/division.exe
Assignment_1/myassigment/division.o
Assignment_1/myassigment/MFCB14C.tmp
Assignment_1/myassigment/multiplication.c
Assignment_1/myassigment/multiplication.c~
Assignment_1/myassigment/multiplication.exe
Assignment_1/myassigment/multiplication.o
Assignment_1/myassigment.rar
Assignment_1/sample_cryptarithm_array.c
Assignment_1/sample_cryptarithm_bits.c
Assignment_1/sample_multiplication.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.