# include <stdio.h>
int main ( void )
{
int j[ 11 ] , a, b, c, i;
a= 0 ;
b= 0 ;
c= 0 ;
printf ( "enter j[i]:" ) ;
for ( i= 0 ; i< 11 ; i++ )
scanf ( "%d" , & j[ i] ) ;
for ( i= 1 ; i< 11 ; i++ ) {
if ( j[ i] <= 0 )
printf ( "输入错误" ) ;
if ( j[ i] >= 85 )
a= a+ 1 ;
if ( j[ i] < 60 )
c= c+ 1 ;
else
b= b+ 1 ;
}
printf ( "优秀为%d人\n" , a) ;
printf ( "通过为%d人\n" , b) ;
printf ( "不及格为%d人\n" , c) ;
}
# include <stdio.h>
int main ( void )
{
int j[ 5 ] , e[ 5 ] , i;
printf ( "enter j[i]:" ) ;
for ( i= 0 ; i< 5 ; i++ )
scanf ( "%d" , & j[ i] ) ;
for ( i= 0 ; i< 5 ; i++ )
e[ i] = j[ 5 - i- 1 ] ;
for ( i= 0 ; i< 5 ; i++ )
printf ( " %d" , e[ i] ) ;
}
# include <stdio.h>
int main ( void )
{
int f[ 2 ] [ 3 ] , e[ 3 ] [ 2 ] ;
int i= 0 ;
int j= 0 ;
printf ( "enter:" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
scanf ( "%d" , & f[ i] [ j] ) ;
e[ j] [ i] = f[ i] [ j] ;
}
}
printf ( "数组f为:\n" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
printf ( "%d " , f[ i] [ j] ) ;
}
}
printf ( "\n数组e为:\n" ) ;
for ( i= 0 ; i< 3 ; i++ ) {
for ( j= 0 ; j< 2 ; j++ ) {
printf ( "%d " , e[ i] [ j] ) ;
}
}
return 0 ;
}
# include <stdio.h>
int main ( void )
{
int f[ 2 ] [ 3 ] , e[ 2 ] [ 3 ] , h[ 2 ] [ 3 ] ;
int i= 0 ;
int j= 0 ;
printf ( "enter f:" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
scanf ( "%d" , & f[ i] [ j] ) ;
}
}
printf ( "数组f为:\n" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
printf ( "%d " , f[ i] [ j] ) ;
}
printf ( "\n" ) ;
}
printf ( "\nenter e:" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
scanf ( "%d" , & e[ i] [ j] ) ;
}
}
printf ( "\n数组e为:\n" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
printf ( "%d " , e[ i] [ j] ) ;
}
printf ( "\n" ) ;
}
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
h[ i] [ j] = f[ i] [ j] + e[ i] [ j] ;
}
}
printf ( "\n数组h为:\n" ) ;
for ( i= 0 ; i< 2 ; i++ ) {
for ( j= 0 ; j< 3 ; j++ ) {
printf ( "%d " , h[ i] [ j] ) ;
}
printf ( "\n" ) ;
}
return 0 ;
}
# include <stdio.h>
int main ( )
{
int I= 2 ;
while ( I)
{
char b;
scanf ( "%c" , & b) ;
if ( b >= 'A' && b <= 'Z' )
{
b = b + 32 ;
printf ( "%c" , b) ;
}
else if ( b >= 'a' && b <= 'z' )
{
b = b - 32 ;
printf ( "%c" , b) ;
}
}
return 0 ;
# include <stdio.h>
int main ( )
{
char a[ 30 ] , b[ 10 ] ;
int i= 0 , j= 0 ;
printf ( "Input two strings: " ) ;
scanf ( "%s%s" , a, b) ;
while ( a[ i] != '\0' ) i++ ;
while ( b[ j] != '\0' ) a[ i++ ] = b[ j++ ] ;
a[ i] = '\0' ;
printf ( "%s" , a) ;
}