Generation

generate functionSat, 01 Apr 2023

Programa que cree un archivo y pida el número de cuenta del banco y el nombre de usuario

#include <stdio.h> int main() { int nc; char nombre[10]; FILE *fichero; printf("Escribe el numero de cuenta\n"); scanf("%i", &nc); printf("Escribe el nombre de usuario\n"); scanf("%s", nombre); fichero = fopen("datos.txt", "w"); fprintf(fichero, "%d %s", nc, nombre); fclose(fichero); return 0; }

Questions about programming?Chat with your personal AI assistant