Profile icon

# Jagdish Hatwar

@jagdishhatwar
4 years ago
22 Aug 19
#include int gcd(int x, int y); int gcd(int x, int y) { if (x == 0) { return y; } while (y != 0) { if (x > y) { x = x - y; }
C
jagdishhatwar
shared a Post
4 years ago
#include int reverse(int num)//using reverse func also { int a,rev=0; while(num>=1) { a=num%10; rev=rev*10+a; num=num/10; } return(rev
C
jagdishhatwar
shared a Post
4 years ago
//Write a function that reverse a number #include int reverse(int num) { int a,rev=0; while(num>=1) { a=num%10; rev=rev*10+a; num=num/10;
C
jagdishhatwar
shared a Post
4 years ago
//Display all the prime numbers between 2 intervals #include int prime(int n)//function defined { int c=0; if (n<2){ return 0; }e
C
jagdishhatwar
shared a Post
4 years ago
#include int isprime(int n) {int c=0; if(n<2) { return 0; } else { for(int i=2;i<n;i++) { if(n%i==0) { c++;
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { while (1) { for(int i=1;i=i;j--)//it varies with value of i { printf("*"); } printf("\n"); //it is reposibl
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { for(int i=1;i=i;j--)//it varies with value of i { printf("*"); } printf("\n"); //it is reposible for the new
C
theangryepicbanana
Please stop constantly posting your assignments here, as it could be considered spam4 years ago
jagdishhatwar
shared a Post
4 years ago
#include int main() { for(int i=1;i=i;j--)//it varies with value of i { printf("*"); } printf("\n"); //it is reposible for the new
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { for(int i=1;i<=10;i++)//it is reposible for providing the new column { for(int j=1;j<=i;j++)//it varies with value of i
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { int a,rev_sum=0,rem,x; printf("Enter the number:"); scanf("%d",&a); x=a; while(a!=0) { rem=a%10; revsum=revsum*10+r
C
theangryepicbanana
Please stop constantly posting your assignments. It is one thing to share something cool you've made every so often, but posting multiple repls every day is kinda spammy.4 years ago
jagdishhatwar
shared a Post
4 years ago
#include int main() { int a,x,y,sum=0,rem; printf("Enter the number:"); scanf("%d",&a); y=a; while(a>0) { rem=a%10; x=remremrem; sum=
C
jagdishhatwar
shared a Post
4 years ago
#include int main() {int a, res,sum=0; printf("Enter the value:"); scanf("%d",&a); //int i=1; while(a>0)//given number should b greater than 0
C
jagdishhatwar
shared a Post
4 years ago
#include int main() {int num,i,c=1; printf("Enter the num:"); scanf("%d",&num); for (i=1;i<=num;i++) { c=c*i;//multiplying the value of c with i wh
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { int num1, num2, x,y,Lcm; printf("Enter first num:"); scanf("%d",&num1); printf("Enter second num:"); scanf("%d",&num2)
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { int num1, num2; printf("Enter first num:"); scanf("%d",&num1); printf("Enter second num:"); scanf("%d",&num2); while
C
jagdishhatwar
shared a Post
4 years ago
#include int main(void) { // int i,j,a,c; // printf("Enter the number:"); // scanf("%d",&a); // c=a; // for (i=1;i<=a;i++) // { int
jagdishhatwar
shared a Post
4 years ago
#include int main(void) {int i,c=1,base, power; printf("Enter the base:"); scanf("%d",&base); printf("Enter the power:"); scanf("%d",&power);
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { int p; printf("Enter the value:"); scanf("%d",&p); //for( int i=1;i<=10;i++) //for( int i=1;i<=p;i++) for( int i=0;i<=p;i
C
jagdishhatwar
shared a Post
4 years ago
#include int main() { int p; printf("Enter the value:"); scanf("%d",&p); //for( int i=1;i<=10;i++) //for( int i=1;i<=p;i++) for( int i=0;i<=p;i
C
jagdishhatwar
shared a Post
4 years ago
#include int main() {int a,i,j; for(int i=1;i<=10;i++) { for(j=1;j<=10;j++) { a=i*j; printf("%d=%d*%d\n",a,i,j); } /
C