Using VC + + to realize printing multiplication table _c language

Source: Internet
Author: User

On the multiplication table, here is not much nonsense, we all understand, the following next use VC + + implementation of the idea code:

Multiplication table. cpp

Copy Code code as follows:

#include <stdio.h>
int main ()
{int i,j;
for (i=1;i<=9;i++)
{for (j=1;j<=i;j++)
printf ("%d¡á%d =%2d", j,i,i*j);
Putchar (' \ n ');
}
GetChar (); GetChar ();
return 0;
}

Multiplication Formula Table 2.cpp

Copy Code code as follows:

#include <stdio.h>
int main ()
{int i,j,k=0,n;
for (i=1;i<=9;i++)
{
k++;
for (j=k;j<=9;j++)
printf ("%d¡á%d =%2d", i,j,i*j);
Putchar (' \ n ');
}
return 0;
}

The above 2 paragraph is this article share all the code, very simple, also very good understanding, hoped everybody can like

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.