Total members 11895 |It is currently Wed Dec 25, 2024 8:28 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





i ve develop a project in pascal but cant make a conversion to c ....

cpp code
program shfrovalka;
uses crt;
var text:string;
m,k,c,men:integer;
procedure cez(var text:string; var k:integer);
begin
clrscr;
writeln('vvedite isxodniy text ');
write('$~/> ');
read(text);
write('vvedite klu4 shifrovani9 ');
readln(k);
for m:=1 to length(text) do
begin
c:=ord(text[m])+k;
if c>256 then c:=c-256;
text[m]:=chr(c);
end;
end;
procedure desh (var text:string);
begin
writeln('vvedite kluch deshifrovki' );
readln(k);
for m:=1 to length(text) do
begin
c:=ord(text[m])-k;
if c<256 then c:=c+256;
text[m]:=chr(c);
end;
end;
begin
repeat
clrscr;
writeln('1 - shifrovka ');
writeln('2 - deshifrovka ');
writeln('3 - sosto9nie texta ');
readln(men);
case men of
1:cez(text,k);
2:desh(text); U?
3:begin
writeln(text);
readkey;
end;
end;
until men = 0;
end.





Last edited by DrRakha on Mon Jan 28, 2013 1:53 pm, edited 2 times in total.
title changed .


Author:
Moderator
User avatar Posts: 47
Have thanks: 1 time

Code:
http://www.garret.ru/ptoc/Readme.htm


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : convert pascal code to c ?
 pascal triangle     -  
 Java Programming Problem: Pascal's Triangle     -  
 How to Convert WMV to AVI on Mac     -  
 Convert String to Date     -  
 convert hexadecimal to decimal     -  
 Convert To Upper Case in C++     -  
 convert timestamp using javascript     -  
 convert lowercase to uppercase     -  
 Convert outputstream to inputstream     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com