olisiko mitään todella helppoa c-kielen harjoitus tehtävää olis kiva kokeilla käytännössä luettua tietoa sorry jos tuli väärään paikkaan
Oon kirjottanu N00b-oppaan, aikanaan kun innostin kavereita c-ohjelmointiin :) Ota yhteyttä, jos kiinnostaa. Ei oo mikään järin suuri mut alkeet siitäki käy selville. "Oppaan" kohdat on ainakin huolella selitetty.
Mua kiinnostaa Freeze. Nyt pistät nopeesti sen johonkin esille, maili ei käy!
Mailissa oisin voinu sen pistää, voin laittaa esillekin, jos kerrot mihin.
Tässä on muutama ehdotus:
1. Anagrammin tunnistus (esim. lato ja talo)
2. Henkilötunnuksen tarkistus (ohjeita löytyy Googlella)
3. Luvun muutos roomalaiseksi (esim. 124 muuttuu CXXIV)
4. Yhdistelmien luominen (esim. ABC, ACB, BAC, BCA, CAB, CBA)
Freeze kirjoitti:
voin laittaa esillekin, jos kerrot mihin.
Veppiin? Kai sulla nyt jossain on kotisivutilaa. Jos ei, niin laita mulle, niin hostaan sitä jossain.
Ei oo kotisivutilaa tällä hetkellä. Tuo on mittavuudeltaan sen verran mitätön, että ei oikee kehtaa jakaa.
Tässä tosielämän harjoitustehtävä, joka piti suorittaa kun haki töihin:
Make a C-language function.
Function is passed three parameters:
char pointer to a string containing an extended binary coded
decimal number
starting at the byte boundary
int length of the above in nibbles (can be odd or 0), actual EBCD
may be
shorter (see below)
char pointer to null ended left justified ascii string containing
at return the EBCD number in ascii format.
Function translates passed EBCD into ascii format. Caller must take
care that
enough room is reserved for the ascii string; overflow is not checked
inside
the function.
EBCD is defined as follows:
- each code (number or character) takes a four bit nibble
- four bit nibbles are consecutive in the string
- codes 0x0 - 0x9 are translated into ascii characters '0' - '9'.
- code 0xC is translated into ascii character '#'
- code 0xD is translated into ascii character '*'
- EBCD can be any length between 0 and length parameter
- EBCD can be left justified. Then 0xF is the end marker
- EBCD can be right justified. Then it is padded with 0xF
- EBCD can be in the middle. Then both above rules apply
- if EBCD is 0 length, null string ("\0") is formed for return.
- if length parameter is 0, EBCD is considered to be 0 length.
The value of the function is char pointer. If parameters follow above
rules
pointer to ascii string is returned, else NULL pointer is returned.
Additionally make a function that generates test cases to the above
function
and a main function that calls them and prints the resulting ascii
string.
Try to make the code as simple as possible and self commenting. Add
comments
clarifying semantics where not self evident. Use semantically
descriptive
names (but not too long).Koita tehdä joku pieni laskin. Se oli munkin eka työ ;)
kiitos kaikille. tuli paljon tehtävää. antti olisko sulla jotain noihin sun ehdotuksiin liittyvää lisä tietoa. eli haluaisin tehdä red dog pelin
mut se taitaa olla liian suuri haave. jos jollain on hyviä ehdotuksia nii mailatkaa.ymmärrykseni on suurinpiirtein tätä tasoa "tiedän että tietokoneita ei saa heittää kivillä"
Aihe on jo aika vanha, joten et voi enää vastata siihen.