User
Pass
2FA
 
 

Problema Borland C++

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message1063
zaku

[Freakazoid]



Status: Offline
(since 04-05-2013 17:38)
Joined: 18 Sep 2012
Posts: 1882, Topics: 68
Location: Craiova

Reputation: -51.3
Votes: 7

 
Post Posted: 19-12-2012, 12:53:27 | Translate post to: ... (Click for more languages)

Se da un sir a[n]=8,5,2,1,7 n=5 . Sa se afiseze minimul si adresa lui din sirul dat de la tastatura .
Vreau sa-mi rezolvati si mie COMPLET problema asta . dau rep !

0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 19-12-2012, 12:58:02 | Translate post to: ... (Click for more languages)

Code:
#include <iostream>
using namespace std;
int main() {
    int n, *a, i, min = 0;
    cin>>n;
    a = new int[n];
    for (i = 0; i < n; ++i) {
        cin>>a[i];
        if (a[i] > a[min]) {
            min = i;
        }
    }
    cout<<"Minim: "<<a[min]<<", Pozitia: "<<min;
    return 0;
}


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 03-05-2024, 22:50:57
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x