Visitor Messages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerryandchandan
    New Member
    • Dec 2008
    • 6

    please can anyone help me.
    the idea of the program is to be like
    printf("Enter your pin muber:");
    but i need to use one of these values in the file i created:
    #include <stdio.h>

    int main()
    {
    FILE *customer_infor mation;
    char pin_number[4]={101,102,103,1 04};
    int test;
    customer_inform ation=fopen("cu stomer_informat ion.txt","w");
    if(customer_inf ormation==NULL)
    {
    puts("Error creating file");
    return (1);
    }

    for(test=0;test <4;test++)
    fprintf(custome r_information," %d\n",pin_numbe r[test]);
    fclose(customer _information);

    printf("Pin numbers:");
    for(test=0;test <4;test++)
    printf("\n%d\n" ,pin_number[test]);
Working...