C
This commit is contained in:
parent
181560baae
commit
335dd3b050
49
DeitelC/HollowSquareOfAsteriks.c
Normal file
49
DeitelC/HollowSquareOfAsteriks.c
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
int a = 0;
|
||||||
|
int b = 1;
|
||||||
|
int c = 1;
|
||||||
|
|
||||||
|
printf("%s\n","Enter side of asteriks!");
|
||||||
|
scanf("%d", &a);
|
||||||
|
|
||||||
|
while(b = 1) {
|
||||||
|
while(c <= a) {
|
||||||
|
printf("*");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
c = 1;
|
||||||
|
b++;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(b != 1 && b < a) {
|
||||||
|
while(c = 1) {
|
||||||
|
printf("*");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
while(c != 1 && c < a) {
|
||||||
|
printf(" ");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
while(c = a) {
|
||||||
|
printf("*");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
c = 1;
|
||||||
|
b++;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(b = a) {
|
||||||
|
while(c <= a) {
|
||||||
|
printf("*");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
c = 1;
|
||||||
|
b++;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
21
DeitelC/SquareOfAsteriks.c
Normal file
21
DeitelC/SquareOfAsteriks.c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
int a = 0;
|
||||||
|
int b = 1;
|
||||||
|
int c = 1;
|
||||||
|
|
||||||
|
printf("%s\n","Enter side of asteriks!");
|
||||||
|
scanf("%d", &a);
|
||||||
|
|
||||||
|
while(b <= a) {
|
||||||
|
while(c <= a) {
|
||||||
|
printf("*");
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
c = 1;
|
||||||
|
b++;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@ -9,6 +9,7 @@ int main(void) {
|
|||||||
printf("%s\n","Enter 10 positive Integer");
|
printf("%s\n","Enter 10 positive Integer");
|
||||||
scanf("%d", &number);
|
scanf("%d", &number);
|
||||||
if(number >= largest) {
|
if(number >= largest) {
|
||||||
|
SecondLargest = largest;
|
||||||
largest = number;
|
largest = number;
|
||||||
} else if (number > SecondLargest && number != SecondLargest){
|
} else if (number > SecondLargest && number != SecondLargest){
|
||||||
SecondLargest = number;
|
SecondLargest = number;
|
||||||
|
BIN
DeitelC/a.exe
BIN
DeitelC/a.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user