Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
int main() { int pocet1, pocet2, pocet3; float cena1, cena2, cena3, rozpocet; scanf_s("%d %f", &pocet1, &cena1); scanf_s("%d %f", &pocet2, &cena2); scanf_s("%d %f", &pocet3, &cena3); scanf_s("%f", &rozpocet); float vysl1 = pocet1*cena1; float vysl2 = pocet2*cena2; float vysl3 = pocet3*cena3; printf("%d x %.2f$ = %.2f$\n", pocet1, cena1, vysl1); printf("%d x %.2f$ = %.2f$\n", pocet2, cena2, vysl2); printf("%d x %.2f$ = %.2f$\n", pocet3, cena3, vysl3); if ((vysl1 + vysl2 + vysl3) > rozpocet) { printf("Suma %.2f$ nestaci na nakup za %.2f$. Chyba %.2f$\n", rozpocet, vysl1 + vysl2 + vysl3, (vysl1 + vysl2 + vysl3) - rozpocet) ; } else { printf("Suma %.2f$ staci na nakup za %.2f$. Ostava %.2f$.\n", rozpocet, vysl1 + vysl2 + vysl3, rozpocet - (vysl1 + vysl2 + vysl3)); } return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)