Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char bar[10][20];
- char jbar[10][200];
- int no1; //IS IT FOR
- int no2;
- int pr1;
- int pr2;
- int x;
- int y;
- int main(){
- for (x = 0; x<10; x++){
- for (y = 0; y<20; y++){
- bar[x][y] = '|';
- }
- }
- x = 0;
- y = 0;
- for (x = 0; x<10; x++){
- for (y = 0; y<200; y++){
- jbar[x][y] = '|';
- }
- }
- for (no1 = 0; no1<3; no1++){
- char bar1[20] = "";
- char jbar1[200] = "";
- printf("Enter bar:\n");
- gets_s(bar1);
- printf("\nEnter Quantity:\n");
- gets_s(jbar1);
- for (no2 = 0; no2<20; no2++){
- bar[no1][no2] = bar1[no2];
- }
- for (pr1 = 0; pr1<200; pr1++){
- jbar[no1][pr1] = jbar1[pr1];
- }
- }
- printf("=================================================================\n");
- for (no1 = 0; no1<3; no1++){
- printf("%d\t", no1 + 1); // 1 2 3
- for (no2 = 0; no2<20; no2++){
- if (bar[no1][no2] == '|'){
- printf("");
- }
- else {
- printf("%c", bar[no1][no2]); // bar
- }
- }
- printf("\t");
- for (pr2 = 0; pr2<200; pr2++){
- if (jbar[no1][pr2] == '|'){
- printf("T");
- }
- else {
- printf("%c", jbar[no1][pr2]); //quantity
- }
- }
- printf("\n");
- }
- printf("=================================================================");
- printf("%c", jbar[9][1]);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement