Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- float a[5], maior, seg;
- for(int i=0; i < 5 ; i++){
- scanf("%f", &a[i]);
- }
- for(int i=0; i < 5 ; i++){
- if( i == 0){
- maior =a[0];
- seg= a[1];
- }
- if( maior < a[i]){
- seg=maior;
- maior=a[i];
- }
- }
- printf("%f \t segundo %f", maior, seg);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement