Jump to content
Fórum Script Brasil
  • 0

trabalho da faculdade venda de ingresso de um teatro


Question

Obs: não esta compilando no visual studio 2017. Não consigo enxergar o erro. alguém poderia me ajudar 

#inc l ude  <s tdio. h>  

#inc l ude  <s tdli b. h>  

int  mai n  (){  

int ig,  Op,   O ps =0, F P;  

pri ntf(" \t=== ========= ======== ======== ======== ========= ==\ n") ;  

pri ntf(" \t=== ========= ======== ======== ======== ========= ==\ n") ;  

pri ntf(" \t=== =====  Ve nada  de  I ng re ss o para  Te at ro  ======= \ n");  

pri ntf(" \t=== ========= ======== ======== ======== ========= ==\ n") ;  

pri ntf(" \t=== ========= ======== ======== ======== ========= ==\ n\n" );  

pri ntf(" \t  ESC OL  UM A D AS O PC OES : \ n" ) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

pri ntf(" \t| PE CAS   EM  CAR T A Z  |\ n \ n"); 

pri ntf(" \t| [1] R e i Le ao |\ n") ; 

pri ntf(" \t| [2] M ogli  |\n") ; 

pri ntf(" \t| [3]  Ta rza n  |\ n"); 

13  

 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- \ n");  

pri ntf("So me nte  20  luga re s  dis po nive s  \n");  

pri ntf(" Ze ro   pa ra s ai r: \ n\ n " ) ;  

s canf("%i",& O p);  

s wi tc h (O p ){  

de fault:                   

pri ntf(" O pcao  i nva li da.\ n") ;  

case   1:

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

pri ntf(" \t  Te atro 1: R e i Le ao\n"); 

pri ntf(" \t Se ss ao [1]: 13:30 hs  \n" );  

pri ntf(" \t Se ss ao [2]: 15:30 hs  \n" );  

pri ntf(" \t Se ss ao [3]: 17:30 hs  \n" );  

pri ntf(" \t Co mpra r  bi l he te  para   qua l s ess ao ? \n\ n") ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

s canf("%i",& O ps );  

if ( Ops ==1)  { 

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;

 

 

 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A ") ;  

}

pri ntf(" \tSe ss ao es colhi da 1: 13:30 hs  - R e i Le ao\n") ;  

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n " ); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==2) { 

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;

 

f ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tSe ss ao es colhi da 2: 15:30 hs  - R e i Le ao\n") ;  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==3)  { 

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  {

17  

 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tSe ss ao es colhi da 3: 17:30 hs  - R e i Le ao\n") ;  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

bre ak;

case   2:

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

pri ntf(" \t  Te atro 2: M ogli \ n"); 

pri ntf(" \t Se ss ao 1: 13:45hs  \ n"); 

pri ntf(" \t Se ss ao 2: 16:15hs  \ n");  

pri ntf(" \t Se ss ao 3: 18:45hs  \ n");  

pri ntf(" \t Co mpra r  bi l he te  para   qua l s ess ao ? \n\ n") ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

s canf("%i",& O ps );  

if ( Ops ==1)  { 

pri ntf (" \tI nfo rme  a  q ua nt ida de  de  b il he te s  que  de se  co mpra r: \ n" );   

 

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o.\n" );  

pri ntf(" \tSe ss ao es colhi da 1: 13:45 hs  - M ogli\n") ;  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==2) { 

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

 

 

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tSe ss ao es colhi da 2: 16:15 hs  - M ogli\n") ;  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==3) { 

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

 

 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ; 

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tSe ss ao es colhi da 3: 18:4 hs  - M ogli\n") ;  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

bre ak;

case   3:

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

pri ntf(" \t  Te atro 3: Ta rza n  \ n"); 

pri ntf(" \t Se ss ao 1: 13:30hs  \ n");  

pri ntf(" \t Se ss ao 2: 15:30hs  \ n");  

pri ntf(" \t Se ss ao 3: 17:30hs  \ n");  

pri ntf(" \t Co mpra r  bi l he te  para   qua l s ess ao ? \n\ n") ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- - \ n");  

s canf("%i",& O ps );  

 

 

if ( Ops ==1)  { 

pri ntf (" \tI nfo rme  a  q ua nt ida de  de  b il he te s  que  de se  co mpra r: \ n" );  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o.\n" );  

pri ntf(" \tSe ss ao es colhi da 1: 13:30 hs  - Ta rza n\ n");  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==2) { 

    

pri ntf(" \tI nfo rme  a  q ua nt ida de  de  bilhe te s  que  de se já co mpra r: \ n");  

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o. \n" );  

pri ntf(" \tSe ss ao es colhi da 2: 15:30 hs  -Ta rza n\ n");  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

if ( Ops ==3) { 

pri ntf (" \tI nfo rme  a  q ua nt ida de  de  b il he te s  que  de se  co mpra r: \ n" );  

 

s canf("%i",& ig) ;  

if ( ig<=20) { 

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

pri ntf(" \t  FOR M AS DE P AG AM EN TO  : : :  \ n\ n") ; 

pri ntf(" \t [1 ]I nte i ra: 8,00 R$ \n") ;  

pri ntf(" \t [2 ]M e ia: 4,00 R$ \n" ); 

s canf("%i",& FP) ;  

pri ntf(" \t- --- --- --- --- --- --- --- --- --- --- --- --- --\ n") ;  

if ( FP==1)  { 

pri ntf(" \t Fo rma   de  Paga me nto ::  IN T EIR A \ n \ n" );  

}

e lse  {

pri ntf(" \t Fo rma   de  Paga me nto :: M EI A \ n\ n");  

}

pri ntf(" \tSe u  bi l he te  foi adi qui ri do co m s uce ss o.\n" );  

pri ntf(" \tSe ss ao es colhi da 3: 17:30 hs  - Ta rza n\ n");  

pri ntf(" \tD ivi rta-s e . Um  bo m e s pe taculo  pra voce .\n\ n "); 

}

e lse  {

pri ntf(" \tN ao   mais  b il he te s \n ");  

}

}

bre ak;}  

s ys te m ("pa us e ");

}

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148692
    • Total Posts
      644524
×
×
  • Create New...