-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a8e094
commit 00e5d46
Showing
20 changed files
with
193 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
|
||
for (int row = 1; row <= 7; row++) | ||
{ | ||
for (int col = 1; col <= 10 ; col++) | ||
{ | ||
if (row==1 || row==7) | ||
{ | ||
printf("*"); | ||
} | ||
else | ||
{ | ||
if (col==1 || col==10) | ||
{ | ||
printf("*"); | ||
} | ||
else | ||
{ | ||
printf(" "); | ||
} | ||
} | ||
} | ||
printf("\n"); | ||
} | ||
|
||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
for (int row = 0; row < 5; row++) | ||
{ | ||
for (int sp = 5-1; sp > row; sp--) | ||
{ | ||
printf(" "); | ||
} | ||
for (int j = 0; j <=row; j++) | ||
{ | ||
printf("%d",j+1); | ||
} | ||
for (int k = row; k > 0; k--) | ||
{ | ||
printf("%d",k); | ||
} | ||
printf("\n"); | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include<stdio.h> | ||
#include<windows.h> | ||
int main() | ||
{ | ||
int space=7; | ||
for (int row = 1; row <= 16; row++) | ||
{ | ||
for (int col = 1; col <= 8; col++) | ||
{ | ||
if (col<=space) | ||
{ | ||
printf(" "); | ||
// Sleep(500); | ||
} | ||
else | ||
{ | ||
if(row<=12) | ||
printf("\x1b[32m* \x1b[0m"); | ||
else | ||
printf("\x1b[33m* \x1b[0m"); | ||
} | ||
} | ||
// Sleep(2000); | ||
if (row<12) | ||
{ | ||
if (row%4==0) | ||
{ | ||
space++; | ||
} | ||
else | ||
{ | ||
space--; | ||
} | ||
} | ||
else | ||
{ | ||
space=4; | ||
} | ||
printf("\n"); | ||
} | ||
|
||
|
||
|
||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
#include<stdio.h> | ||
#include<windows.h> | ||
int main() | ||
{ | ||
char sentence[100]; | ||
// char sentence[100]; | ||
FILE *fptr; | ||
fptr=fopen("C:/Users/Aman_Tiwari/Desktop/priyanshu.txt","a"); | ||
printf("enter the sentence:\n"); | ||
fgets(sentence,100,stdin); | ||
fprintf(fptr,"the sentence is :\t%s",sentence); | ||
fclose(fptr); | ||
// fptr=fopen("C:/Users/admin/Desktop/Aman.txt","w"); | ||
// fptr=fopen("C:/Users/admin/Desktop/Aman.txt","a"); | ||
// printf("enter the sentence:\n"); | ||
// fgets(sentence,100,stdin); | ||
// fprintf(fptr,"the sentence is :\t%s",sentence); | ||
// fclose(fptr); | ||
// system("mkdir \"C:/Users/admin/Desktop/Ravi\""); | ||
// system("code ."); | ||
system("rmdir /s \"C:/Users/admin/Desktop/Ravi\""); | ||
// fptr=fopen("C:/Users/admin/Desktop/Ravi/Aman.txt","w"); | ||
// fclose(fptr); | ||
// remove("C:/Users/admin/Desktop/Aman.txt"); | ||
// rename("C:/Users/admin/Desktop/Aman.txt","C:/Users/admin/Desktop/eklavya.txt"); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
for (int i = 1; i <= 5; i++) | ||
{ | ||
for (int space = 1; space <i; space++) | ||
{ | ||
printf(" "); | ||
} | ||
for (int star = 5; star >= i; star--) | ||
{ | ||
printf("*"); | ||
} | ||
printf("\n"); | ||
} | ||
return 0; | ||
} |