CentrumXP Forum

Portal
  • Akademia
  • Sklep
  • Q&A
Witam na Archiwalnym Forum CentrumXP.pl Zapraszamy do nowej wersji strony: CentrumXP Q&A
CentrumXP Forum Tematyka portalu CentrumXP.pl Inne program c++

program c++

Witam.

Potrzebuje napisac program w c++ ktory sprawdzi ktora z podanych liczb jest najmniejsza.
Dane wejsciowe to 4 liczby (bez zera, ulamkow)

zrobilem cos takiego, ale podaje dobry wynik tylko wtedy gdy pierwsza liczba jest najmniejsza, przy 2,3,4 nic nie wyswietla.
Gdzie mam blad ? Czego brakuje ?

#include
#include

using namespace std;

int main()
{
int a,b,c,d;
cout <
cin >> a;
cout <
cin >> b;
cout <
cin >> c;
cout <
cin >> d;

if (a
if (a
if (a

cout <<

else

if (b
if (b
if (b

cout <<

else

if (c

if (c
if (c

cout <<

else

if (d

if (d
if (d

cout <<



cin.ignore();
getchar();
return 0;
}




z gory dzieki za pomoc...

Odpowiedzi: 2

dzieki za pomoc, troszke to zmodyfikowalem, bo sie o jakies errory szczypal.
#include
#include

using namespace std;
int main()
{
int a,b,c,d;
int naj;

cout <
cin >> a;
cout <
cin >> b;
cout <
cin >> c;
cout <
cin >> d;

naj = a;

if (naj
{
}
else
{
naj = b;
}
if ( naj
{
}
else
{
naj = c;
}
if ( naj
{
}
else
{
naj = d;
}



cout <<

cin.ignore();
getchar();
return 0;
}
gieras
Dodano
13.11.2005 14:07:22
napisane w DEV–C++ 4
sprawdziłem i działa.


#include
#include

int main(int argc, char *argv[])
{
int a;
int b;
int c;
int d;

int naj;


cout <
cin >> a;
cout <
cin >> b;
cout <
cin >> c;
cout <
cin >> d;

naj = a;

if (naj
{
}
else
{
naj = b;
}
if ( naj
{
}
else
{
naj = c;
}
if ( naj
{
}
else
{
naj = d;
}



cout <<


getch();
return 0;
}
adik154
Dodano
13.11.2005 13:59:00
gieras
Dodano:
13.11.2005 13:32:09
Komentarzy:
2
Strona 3 / 3
  • «
  • 1
  • 2
  • 3
Kim jesteśmy?

Jesteśmy największym w Polsce sprzedawcą Office 365 i Azure dla małych i średnich przedsiębiorstw oraz liderem na rynku szkoleń e-learningowych z oprogramowania Microsoft. Prowadzimy też najpopularniejszy w Polsce portal o technologii Microsoft - CentrumXP.

  • O nas w Microsoft Solutions Providers
Kompetencje i nagrody
Microsoft Partner of the Year 2018
  • Partner Roku Microsoft 2018 – Reseller
  • Partner Roku Microsoft 2017 - OEM
  • Partner Roku Microsoft 2016
  • Partner Roku Microsoft 2015 - MŚP
  • Gold Application Development
  • Gold Application Integration
  • Gold Cloud Platform
  • Gold Cloud Productivity
  • Gold Data Platform
  • Gold Small and Midmarket Cloud Solutions
  • Silver Application Development
  • Silver Application Integration
  • Silver Cloud Platform
  • Silver Cloud Productivity
  • Silver Collaboration and Content
  • Silver Data Analytics
  • Silver Data Platform
  • Silver DevOps
  • Silver Datacenter
  • Silver Enterprise Mobility Management
  • Silver Small and Midmarket Cloud Solutions
Więcej
Nasze serwisy
  • CentrumXP Portal
  • CentrumXP Sklep
  • CentrumXP Akademia
  • CentrumXP Q&A
  • Onex Group – usługi IT
Obserwuj nas
  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
Właściciel sklepu
Wydawca serwisu

Onex Group
Al. Niepodległości 18
02-653 Warszawa
NIP: PL 575-172-64-96
REGON: 240028596
www.OnexGroup.pl
Kontakt dla klientów sklepu