*********************************
zad1
Wczytaj liczbe calkowita k, rzeczywista x. oblicz i wypisac y=k*x/(x^2 +1)
*********************************
//---------------------------------------------------------------------------
#pragma hdrstop
#include
#include
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{int k;
float x,y;
scanf("%d",&k);
scanf("%f",&x);
y=k*x/(x*x+1);
printf("y= %f",y);
getch(); return (0);
}
//---------------------------------------------------------------------------
*********************************************
zad2
oblicz
y=(x+k)^(1/3)
*********************************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{ int k;
float y,x;
scanf("%d",&k);
scanf("%f",&x);
y=pow((x+k),(1/3.));
printf("wynik= %f",y);
getch();
return 0;
}
//---------------------------------------------------------------------------
***************************************
zad3
dane x,a.
oblicz
{ (x+a)/ (abs(x)+abs(a)) dla x rozne od a
y= { x dla x=a
***************************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
float a,y,x;
scanf("%f",&a);
scanf("%f",&x);
if (y!=a)
y=(x+a)/(fabs(x)+fabs(a));
else
y==x;
printf("wynik= %f",y);
getch();
return 0;
}
//---------------------------------------------------------------------------
****************************************
zad4
dane x. oblicz
{ komunikat dla x<=0
y= { x/(x+1) dla x>0
****************************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
float y,x;
scanf("%f",&x);
if (x<=0)
printf("popelniles blad");
else
{y=x/(x+1);
printf("wynik= %f",y); }
getch();
return 0;
}
//---------------------------------------------------------------------------
*****************************************
zad5
oblicz
{ 2x+1 dla -1<=x<=4
y= { x^2 reszta
*****************************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
float y,x;
scanf("%f",&x);
if ((x>=-1) && (x<=4))
y=2*x+1;
else
y=x*x;
printf("wynik= %f",y);
getch();
return 0;
}
//---------------------------------------------------------------------------
**********************************
zad6
dane x,a
oblicz
{ sqrt(x^2 - a^2 dla x>a
y= { 1 dla x=a
{ sin(x)/(sin(a)+2) dla x**********************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
float y,x,a;
printf("podaj x ");
scanf("%f",&x);
printf("podaj a ");
scanf("%f",&a);
if (x>a)
y=sqrt(x*x-a*a);
else
if (x==a)
y=1;
else
y=sin(x)/(sin(a)+2);
printf("wynik= %f",y);
getch();
return 0;
}
//---------------------------------------------------------------------------
***********************************
zad7
zadanie z ksiazki str25
***********************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
char letter;
letter = 's';
printf("%c jako ASCII code = %d\n",letter,letter);
getch();
return 0;
}
//---------------------------------------------------------------------------
*******************************
zad8
do zad ze str25 dodajemy 5
*******************************
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include ;
#include ;
#include ;
#pragma argsused
int main(int argc, char* argv[])
{
char letter;
letter = 'a';
printf("%c jako ASCII code = %d\n",letter,letter);
letter=letter+5;
printf("%c jako ASCII code = %d\n",letter,letter);
getch();
return 0;
}
//---------------------------------------------------------------------------
*******************************
zad9
*******************************
Wyszukiwarka
Podobne podstrony:
Programowanie C laborki c 5 12 06
Programowanie C laborki 5 12 06
Programowanie C laborki 12 06
Programowanie C laborki C 19 10 2006
Programowanie C laborki C 26 10 2006
Technobase FM Vol 10 (06 12 2014) [3CD] Tracklista
Programowanie C laborki 9 11 06
Ig MiniVNA v 10 06 11 VISTA user !!
gramatyka grammar fce wszystkie z 2013 10 06 u@6698
29 12 10 am2 2006 k1
slownictwo do fce trudne z 2013 10 06 u@6698 (1)
27 12 10H egzamin analiza 09 1
Analiza Wykład 10 (09 12 10) ogarnijtemat com
1 212010 12 10 WIL Wyklad 10
10 8 06
więcej podobnych podstron