Skip to main content

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opini...

Implementation of NBDF ( Newtons backward difference formula ) in C program



The above table shows the values which are to be calculated by subtracting the corresponding values in the preceding column, and then substituted in the formula given below:


Here, p= (x-x0) /h   ; h=common difference;
After substituting the differences and calculations we will obtain the highly probable value of the function at the given point.


So , now heading for the program:

The program contains : 2 recursive functions and one driver function (main())

Recursive functions:

int fact(int num){
     if(num==0)
         return 1;
     return num*fact(num-1);
 }
this functions will return the factorial of the value which is passed to it through actual parameters.

and another function float pinc() :

float pinc(float p,float pf){
     if(fabs(p-pf)<0.05)
         return p;
     else return p*pinc(p-1,pf);
 }
which accepts two arguments p=higher value and pf=lower value , for example:
In the term p(p+1)(p+2)(p+3)(p+4)........(p+n-1) : p=p and pf=p+n-1 and with the help of recursion the returning value is continuously multiplied by pf-1 value until pf becomes p or (p~pf).

Now to calculate the difference and to show the difference table , we will use matrix of order (nxn) where n=number of points given.

p=(x1-x[n-1])/(x[1]-x[0]);
     for(int i=1;i<n+1;i++)
         for(int j=1;j<n;j++)
             if(y[j][i-1]!=0 && y[j-1][i-1]!=0)
                 y[j][i]=y[j][i-1]-y[j-1][i-1];
     printf("\n                                    TABLE\n\n");
     for(int i=0;i<n;i++){
         for(int j=0;j<n+1;j++)
             if(y[i][j]!=0)
                 printf("%.2f   ",y[i][j]);
         printf("\n");
     }

In the above code , the difference's are stored in a matrix of order (nxn) (y[n][n]) and then they are printed on the user screen , such that when the difference is 0 ,space is printed.

now ,we only have to deal with the substitution of the differences in the formula, to do this we will repetitively add each term in the res variable ,as shown in the code below:


 
 while(c<n && value!=0){
  value=n-1;
  while(y[value][c]==0 && value>=0)
   value--;
  value=y[value][c];
  res+=(pinc(p+c-1,p)*value)/fact(c);  
  c++;
  
 }
The result value is calculated with the help of recursive functions pinc() and fact()

res+=(pinc(p+c-1,p)*value)/fact(c);
Source Code:

//NBDF BY: JATIN YADAV
#include <stdio.h>
#include<stdlib.h>
#include<math.h>
float pinc(float p,float pf){
 if(fabs(p-pf)<0.05)
  return p;
 else return p*pinc(p-1,pf);
}
int fact(int num){
 if(num==0)
  return 1;
 return num*fact(num-1);
}
int main(int argc, char *argv[]) {
 int n;
 float x1,res=0,p;
 printf("********************NBDF************************\n");
 printf("\nEnter the number of data:\t");
 scanf("%d",&n);
 float *x=(float*)calloc(n,sizeof(float));
 float *y[n];
 for(int i=0;i<n;i++)
  y[i]=(float*)calloc(n,sizeof(float)); 
 printf("\nEnter data:\n");
 for(int i=0;i<n;i++)
  scanf("%f%f",&x[i],&y[i][0]);
 printf("\nEnter the value where funtion value is to be found:\t");
 scanf("%f",&x1);
 p=(x1-x[n-1])/(x[1]-x[0]);
 for(int i=1;i<n+1;i++)
  for(int j=1;j<n;j++)
   if(y[j][i-1]!=0 && y[j-1][i-1]!=0)
    y[j][i]=y[j][i-1]-y[j-1][i-1];
 printf("\n                                    TABLE\n\n");
 for(int i=0;i<n;i++){
  for(int j=0;j<n+1;j++)
   if(y[i][j]!=0)
    printf("%.2f   ",y[i][j]);
  printf("\n");
 }
 int c=1,value=1;
 res=y[n-1][0];
 
 while(c<n && value!=0){
  value=n-1;
  while(y[value][c]==0 && value>=0)
   value--;
  value=y[value][c];
  res+=(pinc(p+c-1,p)*value)/fact(c);  
  c++;
  
 }
 
 printf("\n\n Result= %f",res);
 printf("\n\n\n********************Made By: Jatin Yadav*******************\n");
 int temp;
 scanf("%d",&temp);
 free(x);
 free(y);
 return 0;
}

if you want to learn more about " Newtons backward difference formula " or you need a presentation on this topic you can download the power point presentation ( PPT ) by clicking here ;

if any doubts or queries please comment ðŸ™‚



Comments

  1. Great content! Can you please post about linked list insertion and deletion. Thanks!

    ReplyDelete

Post a Comment

Popular posts from this blog

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opini...

What is AI (Artificial Intelligence )? and its characteristics

Definition : Artificial intelligence  (AI) is the ability of a  computer program  or a  machine  to think and learn. It is also a field of study which tries to make computers "smart". They work on their own without being encoded with commands. Types of AI : REACTIVE MACHINES:  The most basic type of AI is purely reactive ,it does not store any memory of past or predict ( calculate ) future happenings. This type of AI is only applicable to specific applications and the principle is choosing the best decision among several options. examples: Deep Blue, IBM’s chess-playing supercomputer LIMITED MEMORY :  this type 2 kind of AI machines are distinct from reactive machine in such a way that it can make optimum decisions based on the past information ( data ). examples: self driving cars. THEORY OF MIND:  The understanding that people,creatures and objects can have thoughts or emotions which effect their own behavior. ...

How to convert google play balance to paypal or UPI [2024]

If your google account contains play balance which you might have earned from google competitions, opinion rewards or gift vouchers, you can transfer the amount to paypal account or any UPI linked bank account.  For transferring the play balance you need to follow 3 simple steps :  1) Download QxCredit app from google play store:                                 2) Purchase a token of your choice by entering the payout details :            3) View your purchase in my tokens section and wait for 72 hours for the transaction to be verified and processed. The below video demonstrates the process of purchasing a token of your choice to convert play balance: After purchasing token you will also receive a confirmation mail from QxCredit regarding the purchased token information. You can also view your purchased token on QxCredit website:...