Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h> //to ci daje podstawowwe funcję I/O (wejść/wyjść) jak printf()
- int main() //to inicjalizuje i definiuje główną funckjęmprogramu
- {
- printf("siemson dej liczby jak chcesz dodwaać xD \n"); // printf() to cosiek do komunikacji z turbo terminalem ( printf = drukujf(unkcja) )
- float A; //to tworzy zmiennną zmiennoprzecinkową ---- typ_zmiennej zmienna; int, float string
- scanf("%f", &A); //to czeka w terminalu jak ktoś wpisze zmienną -- printf("%typ_zmiennej", &zmienna) &- referencja do wartości w zmiennej
- printf("dej wincyj liczb: ");
- float B; // to samo co z A
- scanf("%f", &B);
- float suma; // nowe zmienne
- float diff;
- suma = A + B; // matematyka
- diff = A - B;
- printf("suma wyniosla: %f", suma); //gadaj co wiesz
- printf("roznica wyniosla: %f", diff);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement