Search
 
SCRIPT & CODE EXAMPLE
 

C

ecrire programme en C une fonction remplir tableau et un fonction inverser

#include<stdio.h>
main()
{
	int n, i, T[30], a;
	printf("Entrer la taille du tableau: ");
	scanf("%d",&n);	
	printf("
Remplissage du tableau: 
");	
    for(i=0; i<n; i++){
   		printf("Entrer l'element %d :", i+1);
   		scanf("%d",&T[i]);
	}  
	
	for(i=0; i<n/2; i++){
		a = T[i];
   		T[i] = T[n-i-1];
   		T[n-i-1] = a;
	}
		
	printf("
Le tableau dans l'ordre inverse: 
");
	for(i=0; i<n; i++){
   		printf("%d	",T[i]);
	}  
}
//Source : www.exelib.net
Comment

PREVIOUS NEXT
Code Example
C :: to execute a program using C 
C :: signed and unsigned in c 
C :: pasar a binario recursivo 
C :: create point cloud from rgbd image in open3d v0.10 
C :: do while loop in c 
C :: pointer arithmetic on Arrray in c 
C :: fahrenheit to celcius 
C :: division en java 
C :: esp32 dhcp server 
C :: string in c and how it works 
C :: function that changes all lowercase letters of a string to uppercase. 
C :: open a file in from terminal 
C :: how to print logs when doing unit-testing in rust 
C :: pointer in c 
C :: exponentials in c 
C :: marquee html code with right 
C :: swap using third variable 
C :: c to c convertor 
C :: print in c 11111 00000 11111 00000 11111 
C :: onvert a string into 2d string in c 
C :: %s and string pointer 
C :: translator program in c 
C :: asasz 
C :: Entering raw mode 
C :: 50 north main 07522 
C :: Single-line Comments in C 
C :: program to merge two strings in c 
C :: print number in c 
C :: finding average of elements in array using struct in C? 
C :: transpose of a matrix in c 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =