# Pep/8 How do I output on same line

Page 1 of 1

## 0 Replies - 578 Views - Last Post: 01 October 2012 - 04:12 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=293891&amp;s=3ba8fef3a663cf798485b38bf2bf24f1&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 TheOne6152

• New D.I.C Head

Reputation: 0
• Posts: 36
• Joined: 11-February 09

# Pep/8 How do I output on same line

Posted 01 October 2012 - 04:12 PM

I am brand new to pep/8 like 5 hours new to it. My teacher wants us to input four variables (W,X,Y,Z) and then preform these calculations and out put them in that format:

W + X =
Y + Z =
(W + X) + (Y + Z) =

I can do the calculations perfectly, but I cant seem to out put them on the same line, they always space down a line after I input a variable.

Here is my code so far:
BR                  main
sum1:    .BLOCK 2
sum2:    .BLOCK 2
sum3:    .BLOCK 2
num1:    .BLOCK 2
num2:    .BLOCK 2
num3:    .BLOCK 2
num4:    .BLOCK 2

main:    CHARO               '(',i
LDA                 sum1,d
DECI                num1,d
ADDA                num1,d
CHARO               '-',i
DECI                num2,d
SUBA                num2,d
CHARO               ')',i
STA                 sum1,d
CHARO               '+',i
CHARO               '(',i
LDA                 sum2,d
DECI                num3,d
ADDA                num3,d
CHARO               '-',i
DECI                num4,d
SUBA                num4,d
CHARO               ')',i
STA                 sum2,d
CHARO               '=',i
LDA                 sum3,d
ADDA                sum1,d
ADDA                sum2,d
STA                 sum3,d
DECO                sum3,d
STOP
.END

I also have to output our first and last name, but I dont know how to fit my name into one block. all and any help is greatly appreciated. thank you

Is This A Good Question/Topic? 0

Page 1 of 1

 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}