Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
2,49 € Add to cart
Add to Wish List
Want cheaper?
ID number:246290
 
Author:
Evaluation:
Published: 01.07.2014.
Language: Latvian
Level: College/University
Literature: n/a
References: Not used
Extract

Pārliecinās, vai fails ir atvēries, ja nav, izvada pasiņojumu:
if (newfile==NULL)
printf ("Neizdevas atvert failu!");
Ja viss kārtībā, ielasa no faila payroll tik rindiņas, cik liels norādīts lenght, un saglabā struktūras masīvā. Lai pārliecinātos, ka tas ir izdevies, izvada šo informāciju uzekrāna, tad aizver failu payroll:
else{
for (i=0;i fscanf(newfile, "%s %f %f %f", &sal[i].name,&sal[i].salary, &sal[i].h, &sal[i].likme);
printf("%s %.2f %.2f %.2f", sal[i].name,sal[i].salary, sal[i].h, sal[i].likme);
printf("n");
} } fclose(newfile);
Ar for ciklu norāda – kamēr nav sasniegts ielasāmo rindiņu skaits izpildīt darbību- algas aprēķināšana un izvadīšana uz ekrāna.

Author's comment
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register