Code Monkey home page Code Monkey logo

Abhinav Joshi's Projects

cprogramming-tasks icon cprogramming-tasks

Task 1: #include<stdio.h> main() { char name[20]; int age;' double ph; printf("\nEnter your name,age and phone number\n"); scanf("%s %d %lf",name,&age,&ph); printf("\n Name:%s \n Age:%d \n Phonenumber:%lf",name,age,ph); } Task 2: #include<stdio.h> main() { float c,f; printf("Enter the temperature in fahrenheit"); scanf("%f",&f); c=5*(f-32)/9; printf("Temperature in celsius:%f",c); } Task 3: #include<stdio.h> main() { float aver; int p,c,m,sum; printf("Enter your marks"); scanf("%d %d %d",&p,&c,&m); sum=p+c+m; aver=sum/3; printf("\nThe sum is:%d\nThe average is:%f",sum,aver); } Task 4: #include<stdio.h> #include<string.h> main() { char fn,ln,firstname; printf("\nEnter your first name"); printf("\nEnter your last name"); gets(firstname); gets(ln); fn=strcat(firstname,ln); puts(firstname); } Task 5: #include<stdio.h> main() { int n,rev,rem; printf("Enter the number"); scanf("%d",&n); while(n!=0); { rem=n%10; rev=rev*10+rem; n=n/1; } Task 6: #include<stdio.h> main() { int n,a,rem,res=0; printf("Enter a three digit number"); scanf("%d",&n); a=n; while(a!=0) { rem=a%10; res=res+rem*rem*rem; a=a/10; } if(res==n) printf("%d is an armstrong number",n); else printf("%d is not an armstrong number",n); } Task 7: #include<stdio.h> #include<string.h> main() { char a[100],b[100]; printf("Enter a string"); gets(a); strcpy(b,a); strrev(b); if(strcmp(a,b)==0) printf("The string is a palindrome\n"); else printf("The string is not a palindrome"); } Task 8: #include<stdio.h> main() { int n,i; printf("Enter a number"); scanf("%d",&n); for(i=1;i<=10;++i) { printf("%d * %d=%d\n",n,i,n*i); } } Task 9: #include<stdio.h> main() { int i,j,r; printf("Enter the no.of.rows); scanf("%d",&r); for(i=r;i>=1;--i) { for(j=1;j<=1;++j) { printf("%d ",j); } printf("\n"); } } Task 10: #include<stdio.h> main() { int c,n,fact=1; printf("Enter a number"); scanf("%d",&n); for(c=1;c<=n;c++) { fact=fact*c; printf("Factorial of %d=%d\n",n,fact); } } Task 11: { #include<stdio.h> #include<string.h> { struct Book{ char title[50]; char author[50]; char genre[50]; }; void printbook(struct Book book); main() { struct Book; strcpy(Book.title,"Python"); strcpy(Book.author,"Mycaptain"); strcpy(Book.genre,"programming"); printbook(book); } void printbook(struct Book book){ printf("Book Title:%s\n",book.title); printf("Book author:%s\n",book.author); printf("Book genre:%s\n",book.genre); } Task 12: #include<stdio.h> main() { float a,b,cel,fah; int x; printf("Enter your choice"); scanf("%d",&x); switch(x) { case 1: printf("enter the value of celsius"); scanf("%f",&a); fah=((9*a)/5)+32; printf("\nFahrenheit temperature:%f",fah); break; case 2: printf("Enter the value of fahrenheit"); scanf("%f",&b); cel=5*(b-32)/9; printf("\n Celsius temperature:%f",cel); break; default: exit(0); } } Task 13: #include<stdio.h> main() { int a[50],i,n,large,small; printf("Enter the no.of.elements"); scanf("%d",&n); printf("enter the array"); for(i=0;i<n;++i) { scanf("%d",&a[i]); lar=small=a[0]; for(i=1;i<n;i++) { if(a[i]>large) large=a[i]; if(a[i]<small) small=a[i]; } printf("the largest element is:%d",large); printf("\nThe smallest element is:%d",small); }

near-by-shops icon near-by-shops

Project involves developing an Android app with Firebase as the backend, which serves as a platform connecting consumers with local shops. The app displays discounts, benefiting both consumers and businesses by saving time and money for users while enabling effective product promotion for businesses.

stringreversal icon stringreversal

A C program that allows the user to input a string, and reverses the words of that string as the output. However, the ards "a, an, the" stay attached to the word that follows it in the original sentence.

teavm icon teavm

Compiler of Java bytecode to JavaScript

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.