User
Pass
2FA
 
 

Atentie! Aceasta este versiunea LowFi a topicului! Click aici pentru varianta originala.
Problema 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 Message1279
Vlad_Taekwondo WTF

[Satanistu']

Post Posted: 15-01-2016, 08:30:19 | Translate post to: ... (Click for more languages)

Dintr-un sir de N numere aflate in ordine crescatoare sa se afle cate sunt distincte.

Presupun ca este o problema de clasa a VII-a. Din pacate, eu nu am facut orele de Informatica pana in clasa a IX-a deoarece nu aveam profesor.
0 0
  
PsychoLove

[Silence In The Snow]

Post Posted: 18-01-2016, 18:27:29 | Translate post to: ... (Click for more languages)

#include <iostream>
using namespace std;

int main()
{ int n, nr=0, v[100];
cout<<"n="; cin>>n;
for(int i=0;i<n;i++)
cin>>v[i];

for(int i=0;i<n-1;i++)
if (v[i] != v[i+1])
nr++;
cout>>nr;

return 0; }

Nu am testat-o, dar ar trebui sã meargã. Testeazã și dacã nu e ok sau e ceva ce nu înțelegi îmi dai pm.
@Vlad_Taekwondo WTF
0 0
  

  Topic locked


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

Locked by PsychoLove, 18 January 2016 16:27



 
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 10-08-2025, 23:00:23
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password