User
Pass
2FA
 
 

Pascal language

 
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 Message1727
Costi

[Freakazoid]



Status: Offline
(since 27-03-2024 12:34)
Joined: 23 Mar 2011
Posts: 2125, Topics: 125
Location: Bucuresti

Reputation: 203.2
Votes: 42

     
Post Posted: 08-11-2012, 20:59:17 | Translate post to: ... (Click for more languages)

1) Se da un fisier citire.txt. Se vor citi 5 caractere din fisier. Daca acestea sunt litere mici sa se transforme in litere mari.
2) Se citesc n caractere de la tastatura. Sa se afiseze numai vocalele.

Ma poate ajuta cineva cu aceste doua cerinte? O idee cum sa incep.

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

[The chosen One :X]



Status: Offline
(since 07-08-2014 17:59)
Joined: 16 Jan 2012
Posts: 565, Topics: 65
Location: Konoha village

Reputation: 41.6
Votes: 5

Post Posted: 08-11-2012, 21:49:48 | Translate post to: ... (Click for more languages)

costica te ajut eu -)here Nirvanel..eu iti fac un program dar tu modifica sa fie pascal eu stiu C++
Revin cu edit cu programul, si inca ceva eu til dau cu o variabila..il modifici tu sa fie cu citire.txt..
1.poate am gresit dar macar prinzi algoritmul
#include <iostream.h>
#include <string.h>
int main ()
{
char s[101]; int i,n;
cout<<"sirul="; cin.get (s.101);
n=strlen (s);
for (i=0;i<n;i++)
if (s[i]>='a' && s[i]<='z') cout<<toupper(s[i])<' ';
return 0;
}
2. si pentru 2
#include <iostream.h>
#include <string.h>
int main ()
{
char s[101]; int i,n;
// s=sir, i variabila din for, n= lungimea lui S
cout<<"sirul="; cin.get (s.101);
n=strlen (s); //lungimea
for (i=0;i<n;i++)
strlw (s); // am convertit tot sirul s in litere mici!
if (s[i]='a' || s[i]='e' || s[i]='i' || s[i]='o' || s[i]='u') cout<<s[i]<' ';
return 0;
}


acum ma scuzi ..eu stiu doar C++ dar nu cred ca e mare diferenta ! intre pascal si c++ ..mai schimba cate ceva..in rest..e cam aceeasi treaba...
daca team ajutat zimi:))si te rog scuzama daca am vreo greseala de sintaxa..

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: 09-11-2012, 09:03:13 | Translate post to: ... (Click for more languages)

Da, ai erori de sintaxã logicã, cum ar fi la comparare. Nu compari egalitate cu '=', ci cu '=='. Acum nu știu cum e în Pascal, dar în C++ o sã-ți dea mereu true.

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

[The chosen One :X]



Status: Offline
(since 07-08-2014 17:59)
Joined: 16 Jan 2012
Posts: 565, Topics: 65
Location: Konoha village

Reputation: 41.6
Votes: 5

Post Posted: 09-11-2012, 18:49:11 | Translate post to: ... (Click for more languages)

da scuze am uitat de == - era seara si eram obosit..
0 0
  
Back to top
View user's profile Send private message
Costi

[Freakazoid]



Status: Offline
(since 27-03-2024 12:34)
Joined: 23 Mar 2011
Posts: 2125, Topics: 125
Location: Bucuresti

Reputation: 203.2
Votes: 42

     
Post Posted: 12-11-2012, 19:25:36 | Translate post to: ... (Click for more languages)

Multumesc de ajutor nirvana.. dar nu este bun, am nevoie de pascal
0 0
  
Back to top
View user's profile Send private message
thenewbye911

[Mentally Stable]



Status: Offline
(since 11-07-2013 19:40)
Joined: 28 Sep 2010
Posts: 22, Topics: 3
Location: Romania

Reputation: 53.9
Votes: 3

 
Post Posted: 16-11-2012, 23:03:00 | Translate post to: ... (Click for more languages)

Codu lui nirvana e de *****.

'text' nu e aceeasi chestie ca "text" in C++, in PHP da

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: 17-11-2012, 13:47:05 | Translate post to: ... (Click for more languages)

A pus cum trebuie apostrofii și ghilimelele, în schimb tu te-ai fãcut de *****.

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

[Freakazoid]



Status: Offline
(since 27-03-2024 12:34)
Joined: 23 Mar 2011
Posts: 2125, Topics: 125
Location: Bucuresti

Reputation: 203.2
Votes: 42

     
Post Posted: 17-11-2012, 16:01:35 | Translate post to: ... (Click for more languages)

Va multumesc pentru ajutor, am rezolvat - puteti inchide topicul
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

Locked by nr913, 17 November 2012 17:52



 
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 02-12-2024, 04:11:27
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