Skip to content
Snippets Groups Projects
Commit c86e0866 authored by Mikołaj Warenycia's avatar Mikołaj Warenycia
Browse files

Upload New File

parent 076b3c7c
Branches
No related merge requests found
PitaM.c 0 → 100644
#include<stdio.h>
#include<stdlib.h>
int main(){
float a, b, c;
printf("podaj mi swoje 3 wspolczynniki\n");
scanf("%f %f %f", &a, &b, &c);
printf("a wiec szukasz %.2fx^2+%.2fx+%2f\n", a, b, c);
if (a==0 && b==0){
printf("nieoznaczonosc detected fr fr\n");
}
else if (b*b-4*a*c<0){
printf("dude to sie sprzeczy\n");
}
else if (a==0){
printf("to taka kreska linijka jest\n");
float x;
x=-c/b;
printf("a zeruje sie na %f\n",x);
}
else {
float x1 = (-b-sqrt(b*b-4*a*c))/2*a;
float x2 = (-b+sqrt(b*b-4*a*c))/2*a;
if (x1==x2){
printf("to takie smieszne z jednym punktem kolo x %f\n", x1);
} else{
printf("wyjdzie przyjemne %f i %f\n", x1, x2);
}}
printf("i tyle dobranoc\n");
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment