User
Pass
2FA
 
 

Informatica

 
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 -> Homework zone
Author Message2114
ready

[;x my LoVe ;x ]



Status: Offline
(since 16-11-2014 09:36)
Joined: 01 Feb 2010
Posts: 1025, Topics: 49
Location: oriunde ... oricand ... pe aici .. pe acolo .. everywhere:)

Reputation: 145
Votes: 29

   
Post Posted: 14-12-2012, 10:25:17 | Translate post to: ... (Click for more languages)

Pai am o problema la informatica de a 9-a in C++ dar gen noi facem problemele astea in limbajul de programare adica :
Citeste n , x
Daca n=0 si asa mai departe , am dat un exemplu sa vedeti cum as vrea sa fie facut exercitiul care este : Se citesc 2 nr n , x . Sa se verifice daca cele 2 numere au cifre comune / cel putin o cifra comuna . Recunosc problema probabil e banala , dar nu imi iese . Cum am facut eu :

Citeste n , x
Daca n % 10 = b % 10 atunci
Scrie " Ultima cifra e comuna "
Altfel
Daca n / 10 % 10 = b /10 % 10 atunci
Scrie " Penultima cifra e comuna "
si tot asa daca zic ca numarul are n cifre . Nu cred ca e bine dasta am si postat . Multumes anticipat . -



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
In2ition

[Globul de cristal]



Status: Offline
(since 30-04-2018 18:33)
Joined: 28 Aug 2006
Posts: 11769, Topics: 315
Location: Galati

Reputation: 1842.7
Votes: 199

Post Posted: 14-12-2012, 10:27:22 | Translate post to: ... (Click for more languages)

O vrei in pseudocod sau in limbaj de programare?

We stop looking for monsters under the bed when we realize they're inside of us.

nr913 wrote:
no really, dacã nu era așa țãrancã, și dacã era în bucurești, o luam de nevastã

0 0
  
Back to top
View user's profile Send private message
ready

[;x my LoVe ;x ]



Status: Offline
(since 16-11-2014 09:36)
Joined: 01 Feb 2010
Posts: 1025, Topics: 49
Location: oriunde ... oricand ... pe aici .. pe acolo .. everywhere:)

Reputation: 145
Votes: 29

   
Post Posted: 14-12-2012, 10:29:42 | Translate post to: ... (Click for more languages)

Limbaj de programare , cum am spus mai sus - . Daca ma contrazic singur imi cer scuze -


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
In2ition

[Globul de cristal]



Status: Offline
(since 30-04-2018 18:33)
Joined: 28 Aug 2006
Posts: 11769, Topics: 315
Location: Galati

Reputation: 1842.7
Votes: 199

Post Posted: 14-12-2012, 10:35:48 | Translate post to: ... (Click for more languages)

Iti dau doar partea pentru ultima cifra comuna. Mai incearca, daca nu reusesti iti explic si pentru celelalte cifre.
Nu e bine sa primesti totul deja facut, mai ales la programare. Inveti incercand si rezolvand problemele care apar pe parcurs.

Code:


#include<iostream>
using namespace std;

int main()
{
    int x,n;
cout<<"introdu primul nr";
cin>>x;
cout<<"introdu al 2-lea nr";
cin>>n;
    int a,b;
    a=n%10;
    b=x%10;

    if(a==b)
    {
        cout<<"au ultima cifra comuna";
    }
    else
    cout<<"nu au cifra comuna";
    }



We stop looking for monsters under the bed when we realize they're inside of us.

nr913 wrote:
no really, dacã nu era așa țãrancã, și dacã era în bucurești, o luam de nevastã

0 0
  
Back to top
View user's profile Send private message
ready

[;x my LoVe ;x ]



Status: Offline
(since 16-11-2014 09:36)
Joined: 01 Feb 2010
Posts: 1025, Topics: 49
Location: oriunde ... oricand ... pe aici .. pe acolo .. everywhere:)

Reputation: 145
Votes: 29

   
Post Posted: 14-12-2012, 10:42:16 | Translate post to: ... (Click for more languages)

M-am prins de metoda gen cum se face . Multumesc mult , poti sa imi dai doar pentru ultima cifra cum ai zis si in pseudocod , adica stiu intr-un fel cum se face dar trebuie sa pun o conditie la inceput cred si nu imi da corect . Si scuze daca cer mai mult .. -


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
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: 14-12-2012, 10:47:08 | Translate post to: ... (Click for more languages)

Mã, mai bine pune mâna și învațã. Dupã zici cã are ceva profesorul/profesoara de info cu tine.

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
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 -> Homework zone  


The time now is 02-12-2024, 02:41:08
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