Skip to content

Commit

Permalink
Merge pull request tarunsinghofficial#1814 from heckingyou/main
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
tarunsinghofficial authored Oct 20, 2021
2 parents cfff94a + 47bf856 commit 4535902
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions C Program/AdditionComplexNumbers.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ typedef struct complex {

complexNumber addComplexNumbers(complex, complex);

int main() {
int main(void) {
complexNumber num1, num2, complexSum;
char signOfImag;

cout << "This is for HacktoberFest"<< endl;
cout << "\t<====This is for HacktoberFest===> "<< endl << endl;

cout << "For 1st complex number," << endl;
cout << "Enter real and imaginary parts respectively:" << endl;
Expand Down
6 changes: 3 additions & 3 deletions C Program/Kadane's-Algorithm.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include<stdio.h>
//Function to calculate the maximum sum of a sub-array of a given array easily
//Function to calculate the maximum sum of a sub-array of a given array.
int maxSumarray(int a[], int size){
int i;
int max_sum_so_far=0;
Expand Down Expand Up @@ -38,9 +38,9 @@ int main(){
}


int max_sum = maxSumarray(a,size);
int max_sum = maxSumarray(a,size); //function call.

printf("\n The Maximum Sum of the Sub Array is : %d",max_sum);
printf("\n\n The Maximum Sum of the Sub Array is : %d",max_sum);


return 0;
Expand Down
4 changes: 2 additions & 2 deletions C Program/Strong.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include<stdio.h>

int main()
int main(void)

{

Expand All @@ -10,7 +10,7 @@ int main()

scanf("%d",&num);

temp=num;
temp=num; //temp variable will not reflect the actual value of num.

while(num)

Expand Down
8 changes: 4 additions & 4 deletions C Program/SumOfElementsOfArray.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
//A c program that simply takes elements of the array from the user and finds the sum of these elements.

#include<stdio.h>
void main()
void main(void)
{
int n,i,sum=0,arr[20];

printf("Enter the size of array: ");
scanf("%d",&n);

printf("Enter %d elements in the array: ",n);
for(i=0;i<n;i++)
printf("\nEnter %d elements in the array: ",n);
for(i=0; i<n; i++)
{
scanf("%d",&arr[i]);
scanf("%d",&arr[i]); //taking user input in the array.
sum=sum+arr[i];
}

Expand Down
6 changes: 3 additions & 3 deletions C Program/palindrome.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ int isPal(int );
*/
int n;

int main()
int main(void)
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int palindrome;
printf("\n\nEnter a number to check for Palindrome: ");
printf("\n\nPlease enter a number to check for Palindrome: ");
scanf("%d", &n);
palindrome = isPal(n);
if(palindrome == 1)
printf("\n\n\n%d is palindrome\n\n", n);
else
printf("\n\n\n%d is not palindrome\n\n", n);

printf("\n\n\t\t\tCoding is Fun !\n\n\n");
printf("\n\n\t\t\t<<< Coding is Fun ! >>>\n\n\n");
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example:
5. Create a new pull request from your forked repository (Button located at the top of your repo)
8. Star this repository!

### Show some love 😄
### Please show some love 😄
<a href="https://github.com/tarunsinghofficial" aria-label="Follow @tarunsinghofficial on GitHub"><img src="https://img.shields.io/badge/Follow👉-@tarunsinghofficial-green?style=for-the-badge" />
</a>
<br>
Expand Down

0 comments on commit 4535902

Please sign in to comment.