Skip to main content

QBASIC Programming Tutorial – 5 – Maths Operators




Learn how to begin program using BASIC programming language for Beginners...
For more information.. Drop your comment...

GET THE SOURCE CODE BELOW


5 CLS
10 A% = 15
20 B% = 2
30 ADD% = A% + B%
40 MULT% = A% * B%
50 SUB% = A% - B%
60 DIV% = A% / B%
70 PRINT "THE SUM OF A AND B = ", ADD%
80 PRINT "THE PRODUCT OF A AND B = ", MULT%
90 PRINT "THE DIFFERENCE OF A AND B = ", SUB%
100 PRINT "THE QUOTIENT OF A AND B = ", DIV%
110 MODU% = A% MOD B%
120  PRINT "THE REMAINDER OF A AND B = ", MODU%

Use it anywhere it free...

Comments

Popular posts from this blog

Create a nigerian news blog -4- Homepage Customization Finalized

Laravel one to one relationship with example

  Laravel one to one relationship with example “Laravel eloquent one to one relationship with example”: A one-to-one relationship is a very basic, fundamental Laravel eloquent relationship. Following our  complete guide to Laravel relationships , it simply relates one entity to another. For instance, in our voting application, a User is associated with one Vote. If we were to describe this relationship, we could say: “ Each user has one vote”. READ THE UPDATED VERSION HERE   Defining a one-to-one relationship In order to define this relationship, we call the  hasOne  method on the entity that owns the relationship. Here’s a code snippet defining the relationship. <?php namespace App \ Models ; use Illuminate \ Database \ Eloquent \ Model ; class User extends Model { /** * Get's this user's vote */ public function vote () { return $this ->hasOne(App\Models\Vote::class); } } What happens here is, we pass the n...