[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
C Programming Tutorial – 28 – How to Make a Table
by
Tags:
Comments
27 responses to “C Programming Tutorial – 28 – How to Make a Table”
-
hey you tough great thanks
-
i got an error…. it says "first define here" wat shall i do to solve it??
-
So on this same program how could I make one last column with the sum of the numbers in that row?? Someone help!
-
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!#include <stdio.h>
#include <stdlib.h>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;
} -
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… -
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
-
for loop ception!!!
-
#include <stdio.h>
int main()
{
int birthYear, currentYear, age;
scanf("%d", &birthYear);
scanf("%d", ¤tYear);
age = currentYear- birthYear;
printf("Your Age is: %dn", age);
return 0;
} -
At 4:27 he said this script! It's a code Bucky, this program is compiled not interpreted on runtime.
-
how could i add an extra number (string in my case) in the first row only?
-
Is it console app or windows form app?
-
isn't making a table easier by using backslash t and filling in the data?
-
I bought all this wood for nothing!
-
hahaha forloop inside a for loop… FORLOOPCEPTION XD!!! you killed me bruhh
-
How we can make a multiplication table doing this?
-
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?
-
+thenewboston
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?
-
Cool I made a table but what if I want to put different values than 1234?
-
#include <stdio.h>
#include <stdlib.h>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!
-
XD this video is made exactly a year and 10 mins ago
-
Can we make a christmas tree at code blocks?
something like this but without spaces between each line*
***
***
*****
*******
***
***
*** -
how we can make a christmas tree??
-
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:#include <stdio.h>
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;
} -
Could somebody please tell me how to make the table by a 2-D array? Here is my code, but its not working properly:
#include<stdio.h>
#include <stdlib.h>
#include<math.h>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;
}
Leave a Reply