Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int t[20];
- int T[20];
- int n,a;
- int count = 0;
- do{
- scanf("%d",&n);
- }while((n<5)&&(n>20));
- int i;
- for (i=0;i<n;i++){
- scanf("%d",&t[i]);
- }
- i=0;
- while(i<n){
- a=t[i];
- while(a!= 0){
- a /= 10;
- count++;
- }
- T[i] = count;
- count = 0;
- i++;
- }
- printf("\n*******************\n");
- for (i=0;i<n;i++){
- printf("%d\n",T[i]);
- }
- int max = 0;
- for (i=0;i<n;i++){
- if(T[i]>max)
- max=T[i];
- }
- int m;
- i=0;
- while (T[i]!= max){
- i++;
- }
- printf("%d\n",max);
- printf("le numero contenant le plus des chiffres est: %d \n", t[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement