![]() |
|
|
#1266 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Code:
mt(i,j=i)= for(x=1,i,for(n=1,j,print1(x*n"\t"));print(""))
the trouble comes when the width is more than one page. seems to print to 20,20 perfectly any higher next thing that shows up is the last one. Last fiddled with by science_man_88 on 2010-08-31 at 20:44 |
|
|
|
|
|
#1267 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
|
#1268 | ||
|
Aug 2006
3·1,993 Posts |
Quote:
Quote:
Code:
table(h,w)={
write("output.html", "<!doctype html>");
write("output.html", "<html><head><meta charset='utf-8'><title>Multiplication</title></head>");
write("output.html", "<body><table>");
for(i=1,h,
write1("output.html", "<tr>");
for(j=1,w,
write1("output.html", "<td>", i*j, "</td>")
);
write("output.html", "</tr>");
);
write("output.html", "</table></body></html>");
};
Last fiddled with by CRGreathouse on 2010-08-31 at 21:07 |
||
|
|
|
|
|
#1269 | |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
Quote:
Last fiddled with by science_man_88 on 2010-08-31 at 21:39 |
|
|
|
|
|
|
#1270 |
|
Aug 2006
597910 Posts |
The inefficiency comes from opening and closing the file for every write1() statement. You might get more speed by creating a string with the whole row, then writing that; I'm not sure.
|
|
|
|
|
|
#1271 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#1272 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Code:
mt(i,j=i)=for(n=1,i,v=vector(j,x,n*x);write1("E:\\output.txt",v);write("E:\\output.txt","\n"))
|
|
|
|
|
|
#1273 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
|
#1274 | ||
|
Aug 2006
10111010110112 Posts |
Quote:
Quote:
|
||
|
|
|
|
|
#1275 |
|
Aug 2006
3×1,993 Posts |
Ok. When A180362 shows up, I'll edit it to add
Code:
%S A180362 5,13,109,163,257,271,379,433,487,541,769,3329,7681,7937,9473,10753,11777, %T A180362 12289,13313,14081,14593,15361,17921,18433,19457,22273,23041,23297,25601, %U A180362 26113,26881,30977,31489,32257,36097,36353,37501,37633,37889,39937,40193 %H A180362 Charles R Greathouse IV, <a href="b180362.txt">Table of n, a(n) for n = 1..10000</a> |
|
|
|
|
|
#1276 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
it's up, and doesn't look like he did.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |