Subversion Repositories svnkaklik

Compare Revisions

No changes between revisions

Ignore whitespace Rev 159 → Rev 160

/programy/C/hello/hello.c
0,0 → 1,12
#include <stdio.h>
void main(void)
{
int i;
int z;
 
for(i=1;i<=255;i++)
{
printf("Delka %c %d \216 \n \r",i);
}
scanf(%c, z)
}
/programy/C/nejvetsi/nejvetsi.c
0,0 → 1,30
#include <stdio.h>
 
 
float nejvetsi (float a,b,c)
{
if (a>b)
{
if (a>c) return (a);
}
else
{
if (b>c) return (b);
else return (c);
}
}
 
int main (void)
{
float a,b,c=0;
// zadej hodnoty
printf("\n Zadej hodnotu a= ");
scanf("%f",&a);
printf("\n Zadej hodnotu b= ");
scanf("%f",&b);
printf("\n Zadej hodnotu c= ");
scanf("%f",&c);
printf("nejvetsi hodnota je %f",nejvetsi(a,b,c));
}
/programy/C/nejvetsi/nejvetsi.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/C/test.c
0,0 → 1,6
#include <math.h>
 
main(s)
{
printf(s, 34, s="main(s){printf(s,34,s=%c%s%c,34);} \n",34);
}
/programy/C/tisk/tisk.bin
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/C/tisk/tisk.c
0,0 → 1,11
# include "stdio.h"
 
void main()
{
int c;
 
printf("Zadej hodnotu:");
scanf("%d",&c);
printf("Zadali jste hodnotu %d coz je %x HEX a odpovida znaku ASCII %c. \n ", c,c,c);
 
}
/programy/C/vypocet_ploch/obsah_obvod.c
0,0 → 1,36
#include <math.h>
#include <stdio.h>
#include "./vypocty.h"
 
float obvod_ctverce(float strana); //vypocita obvod ctverce o strane a
float obsah_ctverce(float strana); // vypocita obsah crverce o strane a
float obvod_kruznice(float polomer); // spocita obvod kruznice z polomeru
float obsah_kruznice(float polomer); // spocit obsah kruznice z polomeru
 
int main( void )
{
float r;
float r2;
float a;
float a2;
 
printf("Zadejte polomer r=");
scanf("%f",&r);
 
printf("obvod male kruznice Omk=%25.2f \n",obvod_kruznice(r));
printf("obsah male kruznice Smk=%25.2f \n",obsah_kruznice(r));
 
a=2*r; // a je strana vnitrniho ctverce
printf("obvod vnitrniho ctverce Oc=%25.2f \n",obvod_ctverce(a));
printf("obsah vnitrniho ctverce Sc=%25.2f \n",obsah_ctverce(a));
r2=M_SQRT2*r; // polomer kruznice
printf("obvod kruznice Ok=%25.2f \n",obvod_kruznice(r2));
printf("obsah kruznice Sk=%25.2f \n",obsah_kruznice(r2));
a2=2*r2; // strana vetsiho ctverce
printf("obvod velkeho ctverce Ovc=%25.2f \n",obvod_ctverce(a2));
printf("obsah velkeho ctverce Svc=%25.2f \n",obsah_ctverce(a2));
 
}
 
/programy/C/vypocet_ploch/vypocet
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/C/vypocet_ploch/vypocet.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programy/C/vypocet_ploch/vypocty.h
0,0 → 1,37
/**************************************************************************
**
** knihovna pro vypocet obsahu a ploch zakladnich obrazcu
**
***************************************************************************/
 
float obvod_ctverce(float strana) //vypocita obvod ctverce o strane a
{
float obvod;
 
obvod=4*strana;
return (obvod);
}
 
float obsah_ctverce(float strana) // vypocita obsah crverce o strane a
{
float obsah;
 
obsah=strana*strana;
return (obsah);
}
 
float obvod_kruznice(float polomer) // spocita obvod kruznice z polomeru
{
float obvod;
 
obvod=2*M_PI*polomer;
return (obvod);
}
 
float obsah_kruznice(float polomer) // spocit obsah kruznice z polomeru
{
float obsah;
obsah=polomer*polomer*3,14;
return (obsah);
}