# Author Archives

Sorting of vectors can be done using the sort() function. By default, it sorts in ascending order. To sort...

#### Sort a vector in R Programming Language

Sorting of vectors can be done using the sort() function. By default, it sorts in ascending order. To sort...

Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector. Usage which.min(x) which.max(x) x...

#### Find the position of minimum and maximum of value in R Programming Language

Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector. Usage which.min(x) which.max(x) x...

x <- c(2 ,3 ,4 ,6,1) min(x) y <- c(78,34,5,67,41,33) max(y) Output: \$Rscript main.r 1 78

#### Find the maximum and minimum number in R Programming Language

x <- c(2 ,3 ,4 ,6,1) min(x) y <- c(78,34,5,67,41,33) max(y) Output: \$Rscript main.r 1 78

x <- c(2 ,3 ,4 ,4) y <-c(3, 4 ,5 ,6) print (x+y) print(x-y) print(x*y) print(x/y) print(x%%y) print(x^y) or...

#### Write a R Program to Two vector Variables (Addition, Subtraction, Multiplication, Division, Mod, Coefficient)

x <- c(2 ,3 ,4 ,4) y <-c(3, 4 ,5 ,6) print (x+y) print(x-y) print(x*y) print(x/y) print(x%%y) print(x^y) or...

2+3 //Add 2-3 //Sub 2*3 //Mul 2/3 //Div 2+2+3*4-4/3 // Add, Mul, Sub, Div Output: 5 -1 ...

#### R Programs to Add, Sub, Mul, and Div

2+3 //Add 2-3 //Sub 2*3 //Mul 2/3 //Div 2+2+3*4-4/3 // Add, Mul, Sub, Div Output: 5 -1 ...

First R Program: print (“Hello world!”) Output: “Hello world!” print (“Hello World!”, quote-FALSE) Output: Hello...

#### Simple way:” Hello world program in R”

First R Program: print (“Hello world!”) Output: “Hello world!” print (“Hello World!”, quote-FALSE) Output: Hello...

ASCII Value of ALL characters #include <stdio.h> int main() { int i; for(i=0;i<255;i++) { printf(“ASCII value of character %c=%d\n”,i,i);...

#### Write a C program ASCII values of all Characters

ASCII Value of ALL characters #include <stdio.h> int main() { int i; for(i=0;i<255;i++) { printf(“ASCII value of character %c=%d\n”,i,i);...

Only ASCII values #include <stdio.h> int main() { int i; char ch; for(i=0;i<256;i++) { printf(“%c”,ch); ch=ch+1; } return 0;...

#### Write a C Program to Only ASCII values

Only ASCII values #include <stdio.h> int main() { int i; char ch; for(i=0;i<256;i++) { printf(“%c”,ch); ch=ch+1; } return 0;...

#include <stdio.h> int main() { char ch; printf(“Enter the character”); scanf(“%c”,&ch); printf(“ASCII value of %c=%d”,ch,ch); return 0; } Output:...

#### Write a C Program to ASCII value of a Character:

#include <stdio.h> int main() { char ch; printf(“Enter the character”); scanf(“%c”,&ch); printf(“ASCII value of %c=%d”,ch,ch); return 0; } Output:...

#include<stdio.h> int main() { int i; for(i = 0; i < 26; i++){ printf(“%c = %d | %c =...

#### Write a C program to display All ASCII alphabets

#include<stdio.h> int main() { int i; for(i = 0; i < 26; i++){ printf(“%c = %d | %c =...

#include<stdio.h> int fibonacci_series(int); int main() { int count, c = 0, i; printf(“Enter number of terms:”); scanf(“%d”,&count); printf(“\nFibonacci series:\n”);...

#### Write a C Program to display Fibonacci series using recursion

#include<stdio.h> int fibonacci_series(int); int main() { int count, c = 0, i; printf(“Enter number of terms:”); scanf(“%d”,&count); printf(“\nFibonacci series:\n”);...

Factorial: using symbol “! ” Mathematical Ex: 5! = 120 (5*4*3*2*1=120)) Program: #include<stdio.h> int main() { int i,fact,number; printf(“Enter...

#### Write a C Program to find factorial of number

Factorial: using symbol “! ” Mathematical Ex: 5! = 120 (5*4*3*2*1=120)) Program: #include<stdio.h> int main() { int i,fact,number; printf(“Enter...

Examples of Armstrong Numbers: 0, 1, 2, 3, 153, 370, 407 etc. Program: #include<stdio.h> int main(){ int num,a,p,total=0; printf(“Enter...

#### Write a C program given number Armstrong number or not (only three digits)

Examples of Armstrong Numbers: 0, 1, 2, 3, 153, 370, 407 etc. Program: #include<stdio.h> int main(){ int num,a,p,total=0; printf(“Enter...

Program: #include <stdio.h> int main() { int a, i; printf(“Enter a number: “); scanf(“%d”,&a); for(i=0; i<=5; ++i) { printf(“%d...

#### Write a c program Multiplication table

Program: #include <stdio.h> int main() { int a, i; printf(“Enter a number: “); scanf(“%d”,&a); for(i=0; i<=5; ++i) { printf(“%d...

Program: #include <stdio.h> #include <conio.h> int main(){ int a, b, c; printf(“Enter two numbers \n”); scanf(“%d %d”, &a, &b);...

#### Write ac program to swap two numbers

Program: #include <stdio.h> #include <conio.h> int main(){ int a, b, c; printf(“Enter two numbers \n”); scanf(“%d %d”, &a, &b);...

Program: #include <stdio.h> int main(){ int year; printf(“Enter a year :”); scanf(“%d”,&year); if(((year%400==0 )||(year%100!=0))&&(year%4==0)) printf(“%d is a leap year.\n”,year);...

#### Write C program to check Leap year or Not

Program: #include <stdio.h> int main(){ int year; printf(“Enter a year :”); scanf(“%d”,&year); if(((year%400==0 )||(year%100!=0))&&(year%4==0)) printf(“%d is a leap year.\n”,year);...

Arithmetic operators: Addition : + ; Example: 4+2=6 Subtraction : – ; Example: 4-2=2 Multiplication : * ; Example:...

#### Write a c program to addition, subtraction, multiplication, division and Modules by using two integers

Arithmetic operators: Addition : + ; Example: 4+2=6 Subtraction : – ; Example: 4-2=2 Multiplication : * ; Example:...

Add Two Integers User Input: #include <stdio.h> int main(){ int first integer, second integer, Sum of integers; printf(“Enter first...

#### Write a C program to add two integers

Add Two Integers User Input: #include <stdio.h> int main(){ int first integer, second integer, Sum of integers; printf(“Enter first...