Driver code
public static void Main ( String [ ] args ) { Node head = new Node ( 1 ) ; head . next = new Node ( 2 ) ; head . next . next = new Node ( 3 ) ; head . next . next . next = new Node ( 4 ) ; head . next . next . next . next = new Node ( 5 ) ; int k = 2 ; Console . Write ( " List ▁ is ▁ " ) ; printList ( head ) ; Node answer = fractionalNodes ( head , k ) ; Console . WriteLine ( " Fractional ▁ node ▁ is ▁ " + answer . data ) ; } }