// Arup Guha
// 9/24/08
// Solution to COP 3223 Sec. 3 - Extra Credit for Beginners
// Problem: Harmonic

#include <stdio.h>

int main() {
    
    int numcases, n;
    int i, j;
    double sum;
    FILE *fin;

    // Open the input file.    
    fin = fopen("harmonic.in", "r");
    
    fscanf(fin, "%d", &numcases);
    
    // Process each case.
    for (i=1; i<=numcases; i++) {
    
        // Read in the value for this case.
        fscanf(fin, "%d", &n);    
        
        // Add up each fraction.
        sum = 0;
        for (j=1; j<=n; j++)
            sum = sum + 1.0/j;
        
        // Output the answer in the desired format.
        printf("Case #%d: The %d Harmonic number is %.2lf.\n",i,n,sum);
    }
    
    fclose(fin);
    //system("PAUSE");
    return 0;
}
