All pastes #474338 Raw Edit

Stuff

public c v1 · immutable
·published 2007-05-06 19:40 UTC
rendered paste body
#include <stdio.h>int main(void){    const int price = 5;    unsigned int quantity = 0;     double total_price = 0;        printf("Enter quantity:");    scanf("%d", &quantity);        total_price = quantity * (price * (quantity > 30 ? 0.9 :                   quantity > 50 ? 0.85 : 1));     printf("%.2lf", total_price);          return 0;}