Professional Documents
Culture Documents
Pracadomowalab 3
Pracadomowalab 3
h>
#include <stdlib.h>
int main(void) {
/*double a, b, c;
printf("podaj a");
scanf_s("%lf", &a);
printf("podaj b");
scanf_s("%lf", &b);
printf("podaj c");
scanf_s("%lf", &c);
if (a + b > c && b + c > a && c + a > b && a>0 && b>0 && c>0)
printf("tak");
else
{
printf("nie");
}
/*double a, b, c;
printf("podaj a");
scanf_s("%lf",&a);
printf("podaj b");
scanf_s("%lf",&b);
printf("podaj c");
scanf_s("%lf",&c);
if (a > b && a > c)
printf("%lf", a);
else if (b > a && b > c)
printf("%lf",b);
else
printf("%lf",c);*/
//zad25
/*char i, b;
printf("podaj litere t i nacisnij enter\n");
scanf_s("%c", &i);
b = getchar();
if ((i == 't' || i == 'T') && b == '\n')
printf("tak");
else
printf("nie");*/
//zad26)
/*double a, b, s;
printf("podaj a");
scanf_s("%lf", &a);
printf("podaj b");
scanf_s("%lf", &b);
/*s = a * a + b * b;
if (s == 1.0)
printf("na brzegu");
if (s < 1.0)
printf("wewnatrz");
if (s > 1.0)
printf("na zewnatrz");*/
#include <stdio.h>
#include <stdlib.h>
int main(void){
/*zad 20
double x, y;
int m, n;
printf("podaj dwie liczby cakowite dwukrotnie");
if (scanf_s("%lf", &x) == 0 || scanf_s("%lf", &y) == 0)
printf("zla wartosc");
else {
scanf_s("%lf", &x);
scanf_s("%lf", &y);
m = x;
n = y;
if (x == m and y == n)
printf("%lf %lf", x, y);
else
printf("zla wartosc");
}*/
/*zad 21
int x;
printf("podaj liczbe calkowita szestastokowa");
/*
zad 22
int x;
printf("podaj liczbe calkowita");
if (scanf_s("%d", &x) == 0 || getchar() != '\n')
printf("zla wartosc");
else
printf("%X", x);*/
/*int x;
zad 23
printf("podaj liczbe calkowita nieujemna");
if (scanf_s("%d", &x) == 0 || getchar() != '\n')
printf("zla wartosc");
else
if (x>=0)
printf("%X", x);
else printf("zla wartosc");*/
/* zad 24
int x;
printf("podaj liczbe calkowita");
if (scanf_s("%d", &x) == 0 || getchar() != '\n')
printf("zla wartosc");
else {
if (x >= 0)
printf("nieujemna");
else
printf("ujemna");
}*/
/* zad 28
int x, y;
printf("podaj wspolrzedne");
if (scanf_s("%d", &x) == 0 || scanf_s("%d", &y) == 0 || getchar() != '\n')
printf("zla wartosc");
else {
if (x > 0 && y > 0)
printf("tak");
else printf("nie");
}*/
/*int x, y;
printf("podaj wspolrzedne");
if (scanf_s("%d", &x) == 0 || scanf_s("%d", &y) == 0 || getchar() != '\n')
printf("zla wartosc");
else {
if (x > 0 && y > 0)
printf("1 cwiartka");
else if (x > 0 && y < 0)
printf("4 cwiartka");
else if (x < 0 && y>0)
printf("2 cwiartka");
else if (x < 0 && y < 0)
printf("3 cwiartka");
else if (x == 0 && y == 0)
printf("srodek");
else if (x == 0)
printf("os x");
else if (y == 0)
printf("os y");
}*/
system("pause");
return(0);