C Programming Tutorial – 28 – How to Make a Table

Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts


Alacaster Soi says:

for loop ception!!!

Gordon Matthew says:

Or you could do this…
int main()
 return 0;

The FUTURE Co. says:

Can someone please tell me why the numbers in each row increments instead of printing 1 1 1 1, from where the code instructs the numbers to increment?

sanyki lynch says:

hey you tough great thanks

Kayleigh Chevalier says:

All of my woodworks I made with woodprix. Google and try it.

Gaming Turkey says:

I created an improved program. The user can now decide how many rows and columns will be printed.
Try to run it and let me know what you think!


int main ()

int row=1;
int column;
int columnreq;
int rowreq;

printf (“How many columns do you want your table to be?n”);
scanf (“%d”, &columnreq);
printf (“nHow many rows do you want your table to be?n”);
scanf (“%d”, &rowreq);
printf (“nn”);

rows: for (column=1; column<=columnreq; column++) { printf (“* “); } row++; if (row<=rowreq) { printf (“n”); goto rows; } printf (“nn”); return 0; }

Antonio Saldivar says:

So on this same program how could I make one last column with the sum of the numbers in that row?? Someone help!

maritt dina says:

Could somebody please tell me how to make the table by a 2-D array? Here is my code, but its not working properly:


int i,j;
int t[5][3];
int main(){
for (i=0; i<5; i++){
for (j=0; j<3; j++){
scanf(” %d t”, &t[i][j]);

printf(“the table is: %d”, t[i][j]);
return 0;

finestHQ says:

isn’t making a table easier by using backslash t and filling in the data?

Ernie Leon Guerrero says:

Bucky, you’re hella funny. For-loop-ception…

Thanks for these tutorials. Fucking better than most of the books and sites out there. Your C++ tutorial was awesome, too. I wish you made them even more complex, though. I’d watch ’em. Do you always use Bloodshed for C++ and CodeBlocks for C? Or do you ever switch it up?

Theodoro DaVinci says:

how we can make a christmas tree??

metaDot says:

Cool I made a table but what if I want to put different values than 1234?

izzati jamaludin says:

Mashaallah brother ,so boring

jaleel williams says:

how could i add an extra number (string in my case) in the first row only?

Mohammad Faruque says:

int main()
int birthYear, currentYear, age;
scanf(“%d”, &birthYear);
scanf(“%d”, &currentYear);
age = currentYear- birthYear;
printf(“Your Age is: %dn”, age);
return 0;

SIA says:

Question # 5 [10 points]
Write a C program that asks the user to enter an integer number n and displays the multiplication table for numbers 1 to n. Display each number in 3 places. The output of your program should be as follows for n = 5:


int main ()
int n, i, j;
printf(“Enter a number: “);
scanf(“%d”, &n);
printf(”   “);
for (i = 1; i <= n; i++) printf(“%3d”,i); printf(“n”); for (i = 1; i <= n; i++){ printf(“%3d”, i); for (j = 1; j <= n; j++) printf(“%3d”, i*j); printf(“n”); } return 0; }

nikhil raj says:

i got an error…. it says “first define here” wat shall i do to solve it??

BtheDestroyer says:

I bought all this wood for nothing!

Theodoro DaVinci says:

Can we make a christmas tree at code blocks?
something like this but without spaces between each line


Ratul Asif says:

didnt help at all. cant you make those tiny little words a little larger so that viewers could understand. or may be its just i am blind

Emder says:

Is it console app or windows form app?

FioRazz says:

How we can make a multiplication table doing this?

Christopher Pilcher says:


int main()
    int rows;
    int columns;

    printf(“How many rows?n”);
    scanf(“%d”, &rows);

    printf(“How many columns?n”);
    scanf(“%d”, &columns);

    printf(” “);
    for(int i = 0; i < columns * 3; i++)     {         printf(“^”);     }     printf(“n”);     for(int i = 0; i < (columns * 3) + 2; i++)     {         printf(“=”);     }     printf(“n”);     printf(” “);     for(int i = 0; i < columns * 3; i++)     {         printf(“=”);     }     printf(“n”);     for(int i = 0; i < rows; i++)     {         printf(” “);         for(int j = 0; j < columns;j++)         {             printf(” # “);         }         printf(“n”);     }     printf(” “);     for(int i = 0; i < columns * 3; i++)     {         printf(“=”);     }     printf(“n”);     for(int i = 0; i < (columns * 3) + 2; i++)     {         printf(“=”);     }     printf(“n”);     return 0; } Build your own temple, guys!

Kapil Pudasaini says:

my code isnt running plz help


int main()
int columns;
int rows;

for(rows=1; rows>=6; rows++){
for(columns=1; columns<=4; columns++){ printf(” %d”, columns); } printf(“n”); } return 0; }

Rohan Khanna says:

sequence by user input


int main()
int c, r; int columns, rows;

printf(“Enter no. of rows : “);
scanf(” %d”, &rows);

for(r = 1; r<=rows; r++){ for(c = 1; c<=r; c++){ printf(” %d”, c); } printf(“n”); } }

Sn0w CrAB says:

XD this video is made exactly a year and 10 mins ago

Justin Ong says:

can someone help me?
columns++ is constantly adding
shouldn’t it be
1 2 3 4
5 6 7 8
9 10 11 12 etc…

lilo Rouif says:

hahaha forloop inside a for loop… FORLOOPCEPTION XD!!! you killed me bruhh

Abrar Ali says:

how we use for loop, while loop and do while loop in one program

Abdulnaser Sheikh says:

At 4:27 he said this script! It’s a code Bucky, this program is compiled not interpreted on runtime.

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours