/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

int main()
{
    char line[] = "Pris: 185,00 DKK ( x 2)";
    int price,count;
    int tmp1,tmp2;
    double realprice;
    sscanf(line,"Pris: %d,00 DKK ( x %d)",&price,&count);
    printf("%d %d\n",price,count);
    sscanf(line,"Pris: %d,%d DKK ( x %d)",&tmp1,&tmp2,&count);
    realprice = tmp1 + tmp2/100.0;
    printf("%f %d\n",realprice,count);
    return 0;
}
