Basic algebra formulas that you can revise anytime and anywhere

FORMULAS FOR BEGINNER (a+b) ^2= a^2+b^2+2ab (a+b) ^2= (a-b) ^2+4ab (a-b) ^2= a^2+b^2-2ab (a-b) ^2= (a+b) ^2-4ab a^2+b^2= (a+b) ^2-2ab a^2+b^2= (a-b) ^2+ 2ab a^2-b^2= (a+b) (a-b) (a+b+c) ^2= a^2+b^2+c^2+2(ab+bc+ac) (a-b-c) ^2= a^2+b^2+c^2-2(ab-bc+ac) (a+b) ^3= a^3+b^3+3ab(a+b) (a-b) ^3= a^3-b^3+3ab(a-b) a^3+b^3= (a+b) (a^2-ab+b^2) a^3-b^3= (a-b) (a^2+ab+b^2) a^4-b^4= (a^2-b^2) (a^2+b^2) = (a^2+b^2) (a+b) (a-b) a^5+b^5= (a+b) (a^4-a^3b+a^2b^2-ab^3+b^4) a^5-b^5= (a-b) (a^4+a^3b+a^2b^2+ab^3+b^4)

Five Features Of C Programming Example Programs That Make Everyone Love It.



 Advantages of C

- Fast, Powerful & efficient
- Easy to learn.
- It is portable
- ''Mid-level'' Language
- Widely accepted language
- Supports modular programming style
- Useful for all applications
- C is the native language of UNIX
- Easy to connect with system devices/assembly routines



Print Integer

#include < stdio.h >
int main()
{
int a;
printf("Enter an integer\n");
scanf("%d", &a);
//takes an integer from user
printf("Integer that you have entered is %d\n", a);
return 0;
}


Addition of two no

#include < stdio.h >
int main()
{
int first, second, sum;
printf("Enter two integers to add\n");
scanf("%d%d", &first, &second);
sum = first + second ;
/*Adding contents of first and second and storing in sum*/
printf("Sum of entered numbers = %d\n",sum);
return 0;
}


Add subtract multiply divide

#include < stdio.h >
int main()
{
int first, second, add, subtract, multiply;
float divide;
printf("Enter two integers\n");
scanf("%d%d", &first, &second);
add = first + second;
subtract = first - second;
multiply = first * second;
divide = first / (float)second;
//typecasting
printf("Sum = %d\n",add);
printf("Difference = %d\n",subtract);
printf("Multiplication = %d\n",multiply);
printf("Division = %.2f\n",divide);
return 0;
}


Add n numbers

#include < stdio.h >
int main()
{
int n, sum = 0, c, value;
printf("Enter the number of integers you want to add\n");
scanf("%d", &n);
printf("Enter %d integers\n",n);
for (c = 1; c <= n; c++)
{
scanf("%d",&value);
sum = sum + value;
/*adding each no in sum*/
}
printf("Sum of entered integers = %d\n",sum);
return 0;
}


Add digits

#include < stdio.h >
int main()
{
int n, sum = 0, remainder;
printf("Enter an integer\n");
scanf("%d",&n);
while(n != 0)
{
remainder = n % 10;
/*stores unit place digit to remainder*/
sum = sum + remainder;
n = n / 10;
/*dividing no to discard unit place digit*/
}
printf("Sum of digits of entered number = %d\n",sum);
return 0;
}


Add n numbers

#include < stdio.h >
int main()
{
int n, sum = 0, c, value;
printf("Enter the number of integers you want to add\n");
scanf("%d", &n);
printf("Enter %d integers\n",n);
for (c = 1; c <= n; c++)
{
scanf("%d",&value);
sum = sum + value;
/*adding each no in sum*/
}
printf("Sum of entered integers = %d\n",sum);
return 0;
}


These are the Concept of C programming . We'll be glad if you share your valuable information with us regarding this topic, then it will be a golden oppertunity for all of us to improve ourselves and know more. Comment below!!

Comments

Popular posts from this blog

Are you willing to relocate or travel(HR QUESTION)

How to answer " why do you want to work at our company? "(HR QUESTION)