"write a program that accepts single-line messages ending with a period and displays the checksum character for each message. Your program should continue displaying checksumuntil the user enters a line with only a period."
that is what i'm asked to do, i tried to program it, but i don't know how to move on from what i got, please help me
Code:/* This program will accept single-line messages ending with a period and display the checksum character for each message */ #include <stdio.h> #include <math.h> int main(void) { int checksum; /* output - checksum */ char single_message; /* input - single-line message */ int check; char myarray[150]; char period; char c; /* temporary character */ int i; int j; double y; /* Get the single-line message ending with a period */ printf("Enter a single-line message> "); scanf ("%s", myarray); /* Loop statement */ do { while q = getcchar (); } /* Calculate the checksum */ y += c; do { while(getchar()!='.') // } return 0; }