DATA Step, Macro, Functions and more

Format numbers with percent sign

Reply
Occasional Contributor
Posts: 17

Format numbers with percent sign

[ Edited ]
data ds;
a=33.48	;
b=285;

c=153.78	;
d=102;
e=a+c;
run;
proc print data=ds;
run;

 

my requirement like this f=13.98%;

what is the logic for this value? plz tell me logic.

 

Super User
Posts: 7,809

Re: sas

Posted in reply to vinod4842

This is not a SAS problem, it's just playing around with numbers.

Use your pocket calculator.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,822

Re: Format numbers with percent sign

Posted in reply to vinod4842

You can format a value using 

 

Format f percent12.2;

Note that 0.1 is 10.00%. 

 

PS. I've once again modified your subject line to be more descriptive. Please use a descriptive title, full sentences and formulate clear questions. 

Ask a Question
Discussion stats
  • 2 replies
  • 127 views
  • 2 likes
  • 3 in conversation