Input 10 numbers and reverse all numbers
Input : Please input 10 numbers : 2 8 12 43 76 34 1 9 89 22
Output : Reverse the numbers 22 89 9 1 34 76 43 12 8 2
Problem : Reverse numbers
Input : Please input 10 numbers : 2 8 12 43 76 34 1 9 89 22
Output : Reverse the numbers 22 89 9 1 34 76 43 12 8 2
Problem : Reverse numbers
- #include<stdio.h>
- void main()
- {
- int arr[10];
- printf("Please input 10 numbers : ");
- for(int i=0; i<10; i++){
- scanf("%d", &arr[i]);
- }
- printf("Reverse the numbers ");
- for(int i=9; i>=0; --i){
- printf("%5d", arr[i]);
- }
- }
একটি মন্তব্য পোস্ট করুন