A

@adarshb2005

PYTHON PROJECT

Python
2 years ago
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp # Parameters of the car suspension system m = 1000 # mass of the car (kg) c = 1500 # damping coefficient (Ns/m) k = 20000 # spring constant (N/m) # Impulse force due to the pothole

STRUCTURE OF STUDENT AND DATE OF JOINIG

C
2 years ago
#include <stdio.h> #include <string.h> struct student { int rollno; char name[30]; struct date { int dd; int mm;

structure

C
2 years ago
#include<stdio.h> struct details { char name[100]; int rollno; int semesternumber; char university[100]; char place[100]; float CGPA; };

. C Program to reverse sentence using Recursion

C
2 years ago
#include <stdio.h> int reverseSentence() { char c; scanf("%c", &c); if (c != '\n') { reverseSentence(); printf("%c", c); } } int main() {

C program to print an array in reverse order using Recursion

C
2 years ago
#include <stdio.h> int reverse(int a[],int n) { if(n==0) { return; }else { printf("%d\n",a[n-1]); reverse(a,n-1);

C Program to find sum of all the elements in an array using Recursion

C
2 years ago
#include<stdio.h> int sum_array_elements( int arr[], int n ) { if (n < 0) { return 0; } else { return arr[n] + sum_array_elements(arr, n-1); }

C program to print array elements using C

C
2 years ago
#include <stdio.h> int main() { int arr[10]; int i; printf("\n\nRead and Print elements of an array:\n"); printf("\n"); printf("Input 10 elements in the array :\n");

C Program to reverse a number using Recursion

C
2 years ago
#include <stdio.h> #include <math.h> int rev(int num, int len) { if (len == 1) { return num; } else {

C program to find product of two numbers using Recursion

C
2 years ago
#include <stdio.h> int product(int a, int b) { if (a < b) { return product(b, a); } else if (b != 0) { return (a + product(a, b - 1));

4. Calculating the power of one number raised to another using recursion

C
2 years ago
#include <stdio.h> int power(int n1, int n2); int main() { int base, a, result; printf("Enter base number: "); scanf("%d", &base); printf("Enter power number(positive integer): "); scanf("%d", &a); result = power(base, a); printf("%d^%d = %d", base, a, result);

Fibonacci Series using recursion in C

C
2 years ago
#include <stdio.h> int fibonacci (int num) { if (num == 0) { return 0; } else if (num == 1) { return 1;

Calculate the factorial of a number using Recursion

C
2 years ago
#include<stdio.h> long factorial(int n) { if (n == 0) return 1; else return(n*factorial(n-1)); } int main () {

Sum of natural numbers using Recursion

C
2 years ago
#include <stdio.h> int main () { int result = sum(10); printf ("%d", result); return 0; } int sum (int k) { if (k > 0) { return k + sum (k - 1);

Checks whether character is alphanumeric or not

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("Enter a character: "); scanf("%c", &ch); if (isalnum(ch)) { printf("%c is an alphanumeric character.\n", ch);

. checks whether character is alphabet or not

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("Enter a character: "); scanf("%c", &ch); if (isalpha(ch))

checks whether character is digit or not

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("Enter a character: "); scanf("%c", &ch); if (isdigit(ch)) printf("%c is a digit.\n", ch);

checks whether character is a lowercase/uppercase character or not.

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("Enter a character: "); scanf("%c", &ch); if (isupper(ch)) printf("%c is an uppercase character.\n", ch); else if (islower(ch))

Check the function returns lowercase or upper case

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char ch; printf("Enter a character: "); scanf("%c", &ch); printf("Upper case: %c, Lower case: %c\n", toupper(ch), tolower(ch)); return 0; }

6. C Program to covert lowercase string into upper case

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char s[] = "mech b is the best"; int i = 0; while(s[i]) { putchar(toupper(s[i])); i++;

C Program to covert uppercase string into lowercase

C
2 years ago
#include <stdio.h> #include <ctype.h> int main() { char s[] = "ECJVJBFVBVBBFDBHVBHIVB"; int i = 0; while(s[i]) { putchar(tolower(s[i])); i++;