vj1344 计算器的改良

Vj1344 - a var a,b:integer s:string ch:char procedure main var i,k,t:integer st:string begin readln(s s:=s if s[1]<> then s:= s k:=pos'=,s if s[k

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //Ä£Äâ //Ò»´ÎÑ»·ÕÒλÓÚÁ½ÔËËã·ûÖ®¼äµÄÊý Èç¹û¸ÃÊýĩβÊÇδ֪Êý ÔòϵÊý¸ø a ·ñÔòϵÊý¸ø b //ËùÒÔÒª½øÐиöÔ¤´¦Àí£ºÈç¹û×Ö·û´®µÚһλûÓзûºÅ ¿ÉÒÔ¸øËü¼ÓÉϸö ¡®+¡¯ ͬʱĩβҲ¼ÓÉϸö ¡®+¡¯ //²¢°ÑµÈºÅÈ¥µô ÒÔ¼°µÈºÅÓұߵķûºÅÒª±äºÅ / var a,b:integer; s:string; ch:char; procedure main; var i,k,t:integer; st:string; begin readln(s); s:=s+'+'; if s[1]<>'-' then s:='+'+s;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Ask a homework question - tutors are online