Chang ,JX

рассказ и язык

9*9 table in R and c++

Posted by changjx on September 25, 2007

How to use R write 9*9 table

R code

for(i in seq(2,9,by=1)){
for(j in 1:9){
cat(i,"*",j,"=",i*j,"\n")
}}

Cpp

#include
using namespace std;
int main() {
for(int j = 1; j = 10)
cout << "=" <
using namespace std;
int main() {
for (int i = 2, j = 1;
j =10)? "=": "= ") ;
if(i == 9)
cout <

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>