变量被覆盖。 #include <stdio.h> #include <stdlib.h> #include <stdint.h> /* * */ int main(int argc, char** argv)

变量被覆盖。 #include <stdio.h> #include <stdlib.h> #include <stdint.h> /* * */ int main(int argc, char** argv) ,c,integer,scanf,C,Integer,Scanf,变量被覆盖。 #include <stdio.h> #include <stdlib.h> #include <stdint.h> /* * */ int main(int argc, char** argv) { uint8_t numatoms; uint8_t r; char a[20]; do { printf("NO. OF ATOMS?"); fflush(stdout); scanf("%d", &num

变量被覆盖。
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

/*
 * 
 */
int main(int argc, char** argv) {
uint8_t numatoms;
uint8_t r;
char a[20];

do {
    printf("NO. OF ATOMS?");
    fflush(stdout);
    scanf("%d", &numatoms);
    printf("\r\n");
    for(;;){
        printf("value of numatoms is %u\r\n", numatoms);
        printf("RAY?");
        fflush(stdout);
        scanf("%u", &r);
        printf("value of numatoms is %u\r\n", numatoms);
        if(r < 1)
            break;
        else {
            printf("value of numatoms is %u\r\n", numatoms);
        }
    }
    printf("CARE TO TRY AGAIN?");
    fflush(stdout);
    scanf("%s", a); 
    printf("\r\n");           
} while (a[0] == 'y' || a[0] == 'Y');

return (EXIT_SUCCESS);
SCNuN
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

int main(void) 
{
    uint8_t x;

    scanf( "%" SCNu8, &x );

    printf( "x = %u\n", x );

    return 0;
}