A

@Athul

myAGE USING CALL BY REFERENCE

C
2 years ago
#include <stdio.h> int main() { int myAge = 43; int *ptr = &myAge; printf("%d\n", myAge); printf("%p\n",&myAge); printf("%p/n", ptr); return 0;

armstrong number

C
2 years ago
#include <stdio.h> int main() { int num, originalNum, remainder, result = 0; printf("Enter a three-digit integer: "); scanf("%d", &num); originalNum = num; while (originalNum != 0) { remainder = originalNum % 10;

for loop fibonacci

C
2 years ago
#include<stdio.h> int main() { int n1=0 , n2=1 , n3 , i , number ; printf(" Enter the number of elements \n:"); scanf(" %d ", &number); printf("\n %d %d",n1,n2); for(i=2;i<number;++i) { n3=n1+n2;

Area of the circle

C
2 years ago
#include <stdio.h> #include <math.h> int main() { float r,Area; float pi = 3.14; printf("Enter the value of the radius\n"); scanf("%f",&r); Area = pi * r * r; printf("Area of the circle is = %f",Area);

imaginary roots

C
2 years ago
#include <math.h> #include <stdio.h> int main() { double a, b, c, discriminant, root1, root2, realPart, imagPart; printf("Enter coefficients a, b and c: "); scanf("%lf %lf %lf", &a, &b, &c); discriminant = b * b - 4 * a * c; if

Angle of cosx

C
2 years ago
#include <stdio.h> #include<math.h> int main() { float angle,x; float deno,numer,sum,term; int i,n; printf("enter the angle:\n"); scanf("%f",&angle); printf("enter the value of n:\n");

E pow x

C
2 years ago
#include <stdio.h> #include<math.h> int main() { float x; float numerator,denominator,sum,term; int i,n; printf("Enter the number:\n"); scanf("%f",&x);

ln x

C
2 years ago
#include <stdio.h> #include<math.h> int main() { float x; float numerator,denominator,sum,term; int i,n; printf("enter the number:\n"); scanf("%f",&x);

1 to 100 using while loop

C
2 years ago
#include <stdio.h> int main() { int i=1; while(i<=100) { printf("%d \n",i); i++; } return 0;

hcf and lcm while loop

C
2 years ago
#include <stdio.h> int main() { int n1, n2, i1, i2, t, gcd, lcm; printf("Enter two integers\n"); scanf("%d%d", &i1, &i2); n1 = i1; n2 = i2;

user input multiplication table

C
3 years ago
#include <stdio.h> int main() { int i,n; printf("Enter a number:\n"); scanf("%d",&n); for(i=n;i<=n*10;i=i+n) { printf("\n%d\n",i);

program to find number of times n divided by 2 that gives one

C
3 years ago
#include <stdio.h> int main() { int n,c=0; printf("enter a number:\n"); scanf("%d",&n); if(n%2==1) {

odd numbers from 1 to 100

C
3 years ago
#include <stdio.h> int main() { int i,n,sum=0; printf("Enter the number:\n"); scanf("%d",&n); for(i=0;i<=n;i++)

Print even numbers from 1 to 100

C
3 years ago
#include <stdio.h> int main() { int i; for(i=1;i<=100;i++) { if(i%2==0) { printf("%d \n ", i);

1 to 100

C
3 years ago
#include <stdio.h> int main() { int i; for(i=1;i<=100;i++){ printf(" %d ",i); } return 0; }

bottom full pyramid

C
3 years ago
#include <stdio.h> int main() { int rows = 5; // first loop for printing all rows for (int i = 0; i < rows; i++) { // first inner loop for printing leading white

pattern pyramid bottom right

C
3 years ago
#include <stdio.h> int main() { int rows = 5; // first loop to print all rows for (int i = 0; i < rows; i++) { // first inner loop to print the * in each row

numbers bottom right pyramid

C
3 years ago
#include <stdio.h> int main() { int rows = 5; // first loop to print all rows for (int i = 0; i < rows; i++) { // first inner loop to print the numbers in each row

Full pyramid

C
3 years ago
#include <stdio.h> int main() { int rows = 5; for (int i = 0; i < rows; i++) { for (int j = 0; j < 2 * (rows - i) - 1; j++) {

left hand half pyramid

C
3 years ago
#include <stdio.h> int main() { int rows = 5; for (int i = 0; i < rows; i++) { for (int j = 0; j < 2 * (rows - i) - 1; j++) { printf(" ");