Program sortuje tablice. //sumowanie// <verbatim> #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;); } </verbatim>
This topic: Main
>
TWikiUsers
>
DorotaP
>
ProgramiK
Topic revision: revision 3 (raw view)
Copyright © 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