Globalandlocal
Upcoming SlideShare
Loading in...5
×
 

Globalandlocal

on

  • 367 views

Notes sa computer :)

Notes sa computer :)

Statistics

Views

Total Views
367
Views on SlideShare
367
Embed Views
0

Actions

Likes
0
Downloads
4
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Globalandlocal Globalandlocal Presentation Transcript

  • program Factorprog;Uses crt;Var No: integer;Function Factor(N:integer): integer;Var F,I: integer;BeginF:=1;For I:=N down to 1 doF:= F*I;Factor:=F;End;BeginClrscr;Writeln(‘Enter a number:’);Readln(No);Writeln(‘The Factorial Value:’, Factor(No));Readln;End.
  • program Factorprog; BeginUses crt; Clrscr;Var Writeln(‘Enter base number:’); Base, Expo: integer; Readln(Base);Function Power (B: integer; E: writeln(‘Enter exponent number:’);integer) : integer; Readln(Expo);Var Writeln(‘Power Value:’, P: integer; Power(Base, Expo)); I: integer; Readln;Begin End.P:= 1;I:= E;RepeatP:=P*BI:= I-1;Until (I=0);Power:=P;End;