Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*array reverse*/
- #include<stdio.h>
- int main()
- {
- int a[100], i, n;
- for(i = 0; i<5; i++){
- scanf("%d", &a[i]);
- }
- for(i = 5-1; i>=0; i--){
- printf("%d ", a[i]);
- }
- return 0;
- }
- /*summation */
- #include<stdio.h>
- int main()
- {
- int a[100], i, n, s = 0;
- for(i = 0; i<3; i++){
- scanf("%d", &a[i]);
- }
- for(i = 0; i<3; i++){
- s = s+a[i];
- }
- printf("Sum: %d", s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement