22 lines
409 B
C
22 lines
409 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#define NUM_ROWS 5
|
||
|
|
||
|
int main(void) {
|
||
|
int value = 0;
|
||
|
int row = 0;
|
||
|
double umrechnungsfaktor = 0.0;
|
||
|
|
||
|
(void)printf("Enter conversion rate (1.00 BTC -> CHF): ");
|
||
|
scanf("%lf", &umrechnungsfaktor);
|
||
|
|
||
|
for(row = 1; row <= NUM_ROWS; row += 1) {
|
||
|
value += 200;
|
||
|
(void)printf("%d CHF <--> %f BTC \n", value, value / umrechnungsfaktor);
|
||
|
}
|
||
|
|
||
|
return EXIT_SUCCESS;
|
||
|
|
||
|
|
||
|
}
|