S

@Shobh89

Write a C program to calculate Compound Interest.

C
1 year ago
//C program to calculate Compound Interest #include <stdio.h> //for using pow function // we must include math.h #include<math.h> //Driver Code int main() { //Principle amount

Write a Program to check whether a number is prime or not.

C
1 year ago
#include <stdio.h> int main() { int n,count=0,i; printf("Enter any number"); scanf("%d",&n); for(i=1;i<=n;i++) { if(n%i==0)

Find the largest number among the three numbers.

C
1 year ago
//C program //to find largest of three numbers #include <stdio.h> int main() { int a=1,b=2,c=3; //Conditions for a greatest if(a>b && a>c)

64.c

C
1 year ago
#include <stdio.h> #include <stdlib.h> int main() { int n = 10; int *ptr; ptr = (int *)calloc(n, sizeof(int)); for (int i = 0; i < n; i++)

63.c

C
1 year ago
#include <stdio.h> #include<stdlib.h> int main() { int n=10; int*ptr; ptr=(int *)malloc(n *sizeof(int)); for(int i=0;i<n;i++) { ptr[i]=7*(i+1); }

62.c

C
1 year ago
#include <stdio.h> #include<stdlib.h> int main() { int n=6; int*ptr; ptr=(int *)calloc(n,sizeof(int)); for(int i=0;i<n;i++) { scanf("%d",&ptr[i]); }

61.c

C
1 year ago
#include <stdio.h> #include<stdlib.h> int main() { int n=6; int*ptr; ptr=(int *)calloc(n,sizeof(int)); for(int i=0;i<n;i++) { scanf("%d",&ptr[i]); }

60.c

C
1 year ago
#include <stdio.h> #include<stdlib.h> int main() { int n=6; int*ptr; ptr=(int*)malloc(n*sizeof(int)); for(int i=0;i<n;i++) { scanf("%d",&ptr[i]); }

68.c

C
1 year ago
#include <stdio.h> #include<stdlib.h> int main() { int n=6; int*ptr; ptr=(int*)malloc(n*sizeof(int)); ptr[0]=45; printf("%d \n",ptr[0]); return 0;

58.c

C
1 year ago
#include <stdio.h> typedef struct vector{ int i; int j; } V; V sumVector(V v1, V v2){ V v3 = {v1.i + v2.i, v1.j + v2.j};

57.c

C
1 year ago
#include <stdio.h> struct vector{ int i; int j; }; int main(){ struct vector v={1,2}; printf("the value of vector is %di + %dj",v.i,v.j);

56.c

C
1 year ago
#include <stdio.h> #include<string.h> int main() { char c='o'; int contains=0; char str[]="Shobhit"; for(int i=0;i<56;i++) { printf("Thie is nice character \n");

55.c

C
1 year ago
#include <stdio.h> #include<string.h> int main() { char c='o'; int count=0; char str[]="Shobhit"; for(int i=0;i< strlen(str);i++) { if (str[i]==c){

54.c

C
1 year ago
#include <stdio.h> #include<string.h> int main(){ char str[]="!Nz!obnf!jt!Tipciju!Tjohi"; for(int i=0;i<strlen(str);i++) { str[i]=str[i]-1; }

53.c

C
1 year ago
#include <stdio.h> #include<string.h> int main(){ char str[]=" My name is Shobhit Singh"; for(int i=0;i<strlen(str);i++) { str[i]=str[i]+1; }

52.c

C
1 year ago
#include <stdio.h> int mystrlen(char str[]) { int i=0,count; char c=str[i]; while(c !='\0') { c=str[i]; i++;

51.c

C
1 year ago
#include <stdio.h> char* slice(char str[],int m,int n){ int i=0,count; char *ptr1=&str[m]; char *ptr2=&str[n]; str=ptr1; str[n]='\0';

50.c

C
1 year ago
#include <stdio.h> int strlen(char str[]){ int i=0,count; char c=str[i]; while(c!='\0'){ c=str[i]; i++; }

49.c

C
1 year ago
#include <stdio.h> int main() { char str[6]; //scanf("%s",str) for(int i =0;i<5;i++) { scanf("%c",&str[i]); fflush(stdin); }

48.c

C
1 year ago
#include <stdio.h> int main() { int arr[2][3][4]; for(int i=0;i<2;i++) { for(int j=0;j<3;j++) { for(int k=0;k<4;k++) {