I'm taking a technical English class at my university and we have a list of words and phrases that we're supposed to learn. So I thought it would be fun if I wrote a code where the definition of the word/phrase pops up and I type the word/phrase. Then it says if I'm correct or not. I've gotten my code to work, but now I wonder if I could somehow randomize the order in which the definitions appear(without the same definition appearing twice)? Then when it has gone through all 68 definitions it shuts down like in the code I have now.
The code I have now:
#include <stdio.h>
#include <string.h>
int main ()
{
char word1[30];
char word2[30];
char word3[30];
char word4[30];
char word5[30];
char word6[30];
char word7[30];
char word8[30];
char word9[30];
char word10[30];
char word11[30];
char word12[30];
char word13[30];
char word14[30];
char word15[30];
char word16[30];
char word17[30];
char word18[30];
char word19[30];
char word20[30];
char word21[30];
char word22[30];
char word23[30];
char word24[30];
char word25[30];
char word26[30];
char word27[30];
char word28[30];
char word29[30];
char word30[30];
char word31[30];
char word32[30];
char word33[30];
char word34[30];
char word35[30];
char word36[30];
char word37[30];
char word38[30];
char word39[30];
char word40[30];
char word41[30];
char word42[30];
char word43[30];
char word44[30];
char word45[30];
char word46[30];
char word47[30];
char word48[30];
char word49[30];
char word50[30];
char word51[30];
char word52[30];
char word53[30];
char word54[30];
char word55[30];
char word56[30];
char word57[30];
char word58[30];
char word59[30];
char word60[30];
char word61[30];
char word62[30];
char word63[30];
char word64[30];
char word65[30];
char word66[30];
char word67[30];
char word68[30];
printf("An adjustable wrench [AmE (short for American English)] / spanner [BrE (short for British English)] with large jaws that has its adjusting screw contained in the handle: \n");
scanf("%s",word1);
if (strcmp(word1, "monkey_wrench") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nmonkey_wrench\n");
}
printf("1. A soft mixture of sand and cement and sometimes lime with water, for spreading on walls, ceilings, or other structures, to form a smooth hard surface when dried 2. An adhesive strip of material for covering cuts and wounds: \n");
scanf("%s",word2);
if (strcmp(word2, "plaster") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nplaster\n");
}
printf("A device for controlling the passage of fluid through a pipe or duct, esp. an automatic device allowing movement in one direction only: \n");
scanf("%s",word3);
if (strcmp(word3, "valve") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nvalve\n");
}
printf("A saw with a narrow fine-toothed blade set in a frame, used esp. for cutting metal: \n");
scanf("%s",word4);
if (strcmp(word4, "hacksaw") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nhacksaw\n");
}
printf("A device consisting of a sealed glass tube partially filled with alcohol or other liquid, containing an air bubble whose position reveals whether a surface is perfectly level: \n");
scanf("%s", word5);
if (strcmp(word5, "spirit_level") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nspirit_level\n");
}
printf("An object having a three-dimensional shape like that of a wire wound uniformly in a single layer around a cylinder or cone, as in a corkscrew or spiral staircase; in geometry, a curve on a conical or cylindrical surface which would become a straight line if the surface were unrolled into a plane;\n in biochemistry, an extended spiral chain of atoms in a protein, nucleic acid, or other polymeric molecule; in anatomy, the rim of the external ear: \n");
scanf("%s", word6);
if (strcmp(word6, "helix") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nhelix\n");
}
printf("A slender thread-like object or fibre, especially one found in animal or plant structures; in botany, the slender part of a stamen that supports the anther; in astronomy, a narrow streamer from the sun's chromosphere or in its corona; \na conducting wire or thread with a high melting point, forming part of an electric bulb or thermionic valve and heated or made incandescent by an electric current: \n");
scanf("%s", word7);
if (strcmp(word7, "filament") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nfilament\n");
}
printf("An instrument for drawing circles and arcs and measuring distances between points, consisting of two arms linked by a movable joint, one arm ending in a point and the other usually carrying a pencil or pen: \n");
scanf("%s", word8);
if (strcmp(word8, "a_pair_of_compasses") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \na_pair_of_compasses\n");
}
printf("A machine for shaping wood, metal, or other material by means of a rotating drive which turns the piece being worked on against changeable cutting tools: \n");
scanf("%s", word9);
if (strcmp(word9, "lathe") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nlathe\n");
}
printf("A frothy white mass of bubbles produced by soap, washing powder, etc when mixed with water; heavy sweat visible on a horse's coat as a white foam: \n");
scanf("%s", word10);
if (strcmp(word10, "lather") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nlather\n");
}
printf("A large metal basket or frame on wheels, used for transporting heavy or large items, such as supermarket purchases or luggage at an airport or railway station; a small table on wheels or castors, typically used to convey food and drink; a hospital bed on wheels for transporting patients;\nshort for trolley bus or trolley car: \n");
scanf("%s", word11);
if (strcmp(word11, "trolley") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ntrolley\n");
}
printf("A wheel with a grooved rim around which a cord passes, which acts to change the direction of a force applied to the cord and is used to raise heavy weights: \n");
scanf("%s", word12);
if (strcmp(word12, "pulley") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \npulley\n");
}
printf("A scraping implement with a rubber-edged blade set on a handle, typically used for cleaning windows; a similar small instrument or roller used especially in photography for squeezing water out of prints;\n [ as modifier ] denoting a person who cleans the windscreen of a car stopped in traffic and then demands payment from the driver: squeegee merchants at every road junction: \n");
scanf("%s", word13);
if (strcmp(word13, "squeegee") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nsqueegee\n");
}
printf("[trademark] A two-wheeled motorized personal vehicle consisting of a platform for the feet mounted above an axle and an upright post surmounted by handles: \n");
scanf("%s", word14);
if (strcmp(word14, "Segway") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nSegway\n");
}
printf("Set of rails which forms the route for a tram (= streetcar running on streetcar tracks in AmE): \n");
scanf("%s", word15);
if (strcmp(word15, "tramway") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ntramway\n");
}
printf("A spanner designed to fit into and turn an Allen screw (from the name of the American manufacturer, the Allen Manufacturing Company, of Hartford, Connecticut): \n");
scanf("%s", word16);
if (strcmp(word16, "Allen_key/wrench") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nAllen_key/wrench\n");
}
printf("A shallow, circular, transparent dish with a flat lid, used for the culture of microorganisms (named after Julius R. Petri [1852-1922], German bacteriologist): \n");
scanf("%s", word17);
if (strcmp(word17, "Petri_dish") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nPetri_dish\n");
}
printf("An increase (or decrease) in the frequency of sound, light, or other waves as the source and observer move towards (or away from) each other. \nThe effect causes the sudden change in pitch noticeable in a passing siren, as well as the red shift seen by astronomers (named after Johann Christian Doppler [1803-53], Austrian physicist): \n");
scanf("%s", word18);
if (strcmp(word18, "the_Doppler_effect") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nthe_Doppler_effect\n");
}
printf("A tool designed to fit into and turn a Philips screw (from the name of its original American manufacturer, Henry F. Phillips [1890-1958]): \n");
scanf("%s", word19);
if (strcmp(word19, "Phillips_screwdriver") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nPhillips_screwdriver\n");
}
printf("A first-aid procedure for dislodging an obstruction from a person's windpipe in which a sudden strong pressure is applied on their abdomen, between the navel and the ribcage (named after Henry J. Heimlich (b. 1920), the American doctor who developed the procedure): \n");
scanf("%s", word20);
if (strcmp(word20, "Heimlich_manoeuvre/maneuvre") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nHeimlich_manoeuvre/maneuvre\n");
}
printf("A container with a lid, handle and a spout, used for boiling water: \n");
scanf("%s",word21);
if (strcmp(word21, "kettle") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nkettle\n");
}
printf("Knives, forks and spoons, used for eating and serving food: \n");
scanf("%s",word22);
if (strcmp(word22, "cutlery") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ncutlery\n");
}
printf("To force out air suddenly and noisily through your throat, for example when you have a cold: \n");
scanf("%s",word23);
if (strcmp(word23, "to_cough") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nto_cough\n");
}
printf("Run away secretly, often taking something or somebody along: \n");
scanf("%s",word24);
if (strcmp(word24, "abscond") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nabscond\n");
}
printf("Dark-skinned, naturally having skin of a dark color: \n");
scanf("%s", word25);
if (strcmp(word25, "swarthy") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nswarthy\n");
}
printf("A program or set of instructions that tells your electronic device what to do: \n");
scanf("%s", word26);
if (strcmp(word26, "software") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nsoftware\n");
}
printf("Any form of software meant to cause harm to the computer it has infected or its user: \n");
scanf("%s", word27);
if (strcmp(word27, "malware") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nmalware\n");
}
printf("Refers to the space between characters and the process of adjusting said space in order to make the text more presentable: \n");
scanf("%s", word28);
if (strcmp(word28, "kerning") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nkerning\n");
}
printf("Storing something in either a hidden or secure place for safety or concealment; in computer science, data that a website stores on your computer so that everything will work faster and smoother: \n");
scanf("%s", word29);
if (strcmp(word29, "cache") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ncache\n");
}
printf("A dream where you are aware of that you are dreaming. You can influence the course of the dream, control characters, places … you do what you want: \n");
scanf("%s", word30);
if (strcmp(word30, "lucid_dream") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nlucid_dream\n");
}
printf("A dream preceding a real event that seems to foretell its occurrence: \n");
scanf("%s", word31);
if (strcmp(word31, "premonitory_dream") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \npremonitory_dream\n");
}
printf("To try to make someone do something for you by offering him money or presents: \n");
scanf("%s", word32);
if (strcmp(word32, "bribe") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nbribe\n");
}
printf("An unfriendly and proud person who considers herself/himself better than other people: \n");
scanf("%s", word33);
if (strcmp(word33, "haughty") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nhaughty\n");
}
printf("It's a temporary feeling that you can experience when you are sick and you have fever: \n");
scanf("%s", word34);
if (strcmp(word34, "dizziness") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ndizziness\n");
}
printf("To allow a new situation or activity to develop and become very common: \n");
scanf("%s", word35);
if (strcmp(word35, "open_the_floodgates") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nopen_the_floodgates\n");
}
printf("A soft, shiny light: \n");
scanf("%s", word36);
if (strcmp(word36, "gleam") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ngleam\n");
}
printf("(informal) a scientist, especially one doing research: \n");
scanf("%s", word37);
if (strcmp(word37, "boffin") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nboffin\n");
}
printf("Giving unfair advantages to your own family if you are in a position of power, especially by giving them jobs: \n");
scanf("%s", word38);
if (strcmp(word38, "nepotism") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nnepotism\n");
}
printf("Somebody ate so much of something that they do not feel they want any more: \n");
scanf("%s", word39);
if (strcmp(word39, "satiated") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nsatiated\n");
}
printf("A person who is sucking up to those in power: \n");
scanf("%s", word40);
if (strcmp(word40, "lickspittle") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nlickspittle\n");
}
printf("To secrete a salty, watery fluid from the sweat glands of the skin, especially when very warm as a result of strenuous exertion; sweat: \n");
scanf("%s",word41);
if (strcmp(word41, "perspire") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nperspire\n");
}
printf("Usually a corner or type of hiding spot that often provides some kind of cover and exclusion: \n");
scanf("%s",word42);
if (strcmp(word42, "nook") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nnook\n");
}
printf("Something that is based on another source: \n");
scanf("%s",word43);
if (strcmp(word43, "derivative") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nderivative\n");
}
printf("Cheerful readiness, willingness or enthusiasm: \n");
scanf("%s",word44);
if (strcmp(word44, "alacrity") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nalacrity\n");
}
printf("A person not able to manage things properly or look after oneself, not responsible enough; somebody who is ineffective or irresponsible: \n");
scanf("%s", word45);
if (strcmp(word45, "feckless") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nfeckless\n");
}
printf("Smallness or insufficiency of number or quantity; lack: \n");
scanf("%s", word46);
if (strcmp(word46, "paucity") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \npaucity\n");
}
printf("To advance in rank, dignity, position, etc.: \n");
scanf("%s", word47);
if (strcmp(word47, "promote") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \npromote\n");
}
printf("To allow something to continue for a period time, for example when you feed someone: \n");
scanf("%s", word48);
if (strcmp(word48, "sustain") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nsustain\n");
}
printf("To place (different things) side by side (as to compare them or contrast them or to create an interesting effect): \n");
scanf("%s", word49);
if (strcmp(word49, "juxtapose") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \njuxtapose\n");
}
printf("A person who shapes his or her conduct to conform to the opinions of the time or of persons in power, especially for selfish ends; A person who doesn't work very hard and just await their retirement.: \n");
scanf("%s", word50);
if (strcmp(word50, "time-server") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ntime-server\n");
}
printf("The calculated illustrative calendar date on which humanity's resource consumption for the year exceeds Earth's capacity to regenerate those resources that year: \n");
scanf("%s", word51);
if (strcmp(word51, "Earth_Overshoot_Day") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nEarth_Overshoot_Day\n");
}
printf("A tall metal structure with a long horizontal part, used for lifting and moving heavy objects: \n");
scanf("%s", word52);
if (strcmp(word52, "crane") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ncrane\n");
}
printf("A pain you can feel on your side when you're running and not breathing properly: \n");
scanf("%s", word53);
if (strcmp(word53, "stitch") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nstitch\n");
}
printf("To try to persuade someone to change his religion or their political believes: \n");
scanf("%s", word54);
if (strcmp(word54, "proselytize") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nproselytize\n");
}
printf("Not connected with religious or spiritual matters: \n");
scanf("%s", word55);
if (strcmp(word55, "secular") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nsecular\n");
}
printf("Considered the predecessor to modern computer hacking. It was primarily different methods that enabled you to make free long distance calls by use of a so called BLUE BOX. Later during the 1980s-1990s when home computers became more common,\nit was used to hack the computers through the dial up modems that was connected to the phone-lines.: \n");
scanf("%s", word56);
if (strcmp(word56, "phreaking") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nphreaking\n");
}
printf("The delay between transmitting and processing information: \n");
scanf("%s", word57);
if (strcmp(word57, "latency") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nlatency\n");
}
printf("A stubborn person, refusing to change one's decision or one's opinion in any way: \n");
scanf("%s", word58);
if (strcmp(word58, "obduracy") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nobduracy\n");
}
printf("Mysterious, strange or unfamiliar; difficult or impossible to explain: \n");
scanf("%s", word59);
if (strcmp(word59, "uncanny") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nuncanny\n");
}
printf("A short trip or outing to some place, usually for a special purpose: \n");
scanf("%s", word60);
if (strcmp(word60, "excursion") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nexcursion\n");
}
printf("Poorly or improperly nourished: \n");
scanf("%s",word61);
if (strcmp(word61, "malnourished") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nmalnourished\n");
}
printf("A person who earns money by taking advantage of bad things that happen to other people or by using things that other people throw away: \n");
scanf("%s",word62);
if (strcmp(word62, "bottom-feeder") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nbottom-feeder\n");
}
printf("Exaggerated stories: \n");
scanf("%s",word63);
if (strcmp(word63, "ripping_yarns") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nripping_yarns\n");
}
printf("To intentionally or unintentionally exclude or leave out somone or something: \n");
scanf("%s",word64);
if (strcmp(word64, "omit") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nomit\n");
}
printf("An adjective describing something as never ending or never changing: \n");
scanf("%s", word65);
if (strcmp(word65, "perpetual") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nperpetual\n");
}
printf("Something that attracts you to it by offering you advantages or pleasure: \n");
scanf("%s", word66);
if (strcmp(word66, "enticing") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nenticing\n");
}
printf("It is a yellow flower that you can find in your garden, in the middle of the grass. After flowering, it becomes a ball of flying seeds: \n");
scanf("%s", word67);
if (strcmp(word67, "dandelion") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \ndandelion\n");
}
printf("Something that is less bright in color than before, when it is bleach, colorless, washy: \n");
scanf("%s", word68);
if (strcmp(word68, "faded") == 0)
{
printf("Correct!\n");
}
else
{
printf("Wrong! \nfaded\n");
}
return 0;
}
Aucun commentaire:
Enregistrer un commentaire