Wu Yuxiong - natural born C language development: Input & Output

#include <stdio.h>
int main()
{
    int testInteger = 5;
    printf("Number = %d", testInteger);
    return 0;
}
#include <stdio.h>
 int main () 
{ 
    a float F; 
    the printf ( " the Enter A Number: " );
     // % F floating-point data matching 
    Scanf ( " % F " , & F); 
    the printf ( " the Value = F% " , F);
     return  0 ; 
}
#include <stdio.h>
 
int main( )
{
   int c;
 
   printf( "Enter a value :");
   c = getchar( );
 
   printf( "\nYou entered: ");
   putchar( c );
   printf( "\n");
   return 0;
}
#include <stdio.h>
 
int main( )
{
   char str[100];
 
   printf( "Enter a value :");
   gets( str );
 
   printf( "\nYou entered: ");
   puts( str );
   return 0;
}
#include <stdio.h>
int main( ) {
 
   char str[100];
   int i;
 
   printf( "Enter a value :");
   scanf("%s %d", str, &i);
 
   printf( "\nYou entered: %s %d ", str, i);
   printf("\n");
   return 0;
}

 

Guess you like

Origin www.cnblogs.com/tszr/p/10968709.html