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
Amazon Auto Links: No products found.
for loop ception!!!
Or you could do this…
#include
#include
int main()
{
printf(“Namet”);
printf(“Aget”);
printf(“Gendern”);
printf(“Joshuat”);
printf(“20t”);
printf(“Mn”);
printf(“Jewelt”);
printf(“29t”);
printf(“Fn”);
printf(“Gordont”);
printf(“24t”);
printf(“Mn”);
system(“pause”);
return 0;
}
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?
hey you tough great thanks
All of my woodworks I made with woodprix. Google and try it.
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
#include
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; }
So on this same program how could I make one last column with the sum of the numbers in that row?? Someone help!
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
#include
#include
isn’t making a table easier by using backslash t and filling in the data?
+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?
how we can make a christmas tree??
Cool I made a table but what if I want to put different values than 1234?
Mashaallah brother ,so boring
how could i add an extra number (string in my case) in the first row only?
#include
int main()
{
int birthYear, currentYear, age;
scanf(“%d”, &birthYear);
scanf(“%d”, ¤tYear);
age = currentYear- birthYear;
printf(“Your Age is: %dn”, age);
return 0;
}
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
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; }
i got an error…. it says “first define here” wat shall i do to solve it??
I bought all this wood for nothing!
Can we make a christmas tree at code blocks?
something like this but without spaces between each line
*
***
*****
*******
*********
***
***
***
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
Is it console app or windows form app?
How we can make a multiplication table doing this?
#include
#include
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!
my code isnt running plz help
#include
#include
#include
#include
#include
sequence by user input
#include
#include
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"); } }
XD this video is made exactly a year and 10 mins ago
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…
hahaha forloop inside a for loop… FORLOOPCEPTION XD!!! you killed me bruhh
how we use for loop, while loop and do while loop in one program
At 4:27 he said this script! It’s a code Bucky, this program is compiled not interpreted on runtime.