You are here: Foswiki>Main Web>TWikiUsers>DorotaP>ProgramiK (revision 3)EditAttach
Program sortuje tablice.

//sumowanie//

#include<stdio.h>

void main()

{

int n,i;

float s,tab[20];

printf("podaj liczbe skladnikow (nie wieksze, niz 20): ");

scanf("%d", &n);

if (!(n<=20))

{s=0;

printf("\npodaj liczby:\n");

for (i=0; i<n; i++)

scanf("&f", &tab[i]);

for(i=0; i<n; i++)

{printf(%f8.2\n", tab[i]");

s=s+tab[i];}

printf("+%f7.2", tab[n-1]);

s=s+tab[n-1]

printf("----------------");

printf("%f8.1", s;);

}

Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r3 - 09 Jun 2004, DorotaP
 
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback