<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by ccc</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Sat, 10 Oct 2026 02:04:51 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Help me ...</title>
            <link>http://forum.lowyat.net/topic/371893</link>
            <description>&lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;   &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt; Help me in these C programing ....&lt;br /&gt;&lt;br /&gt;QUestion 1&lt;br /&gt;Use notepad to type the following paragraph and save it as &quot;source.dat&quot; inside your floppy or pen drive.&lt;br /&gt;&lt;br /&gt;Precedence is used to determine the order in which different operators in a complex expression are evaluated. Associativity is used to determine the order in which operators with the same precedence are evaluated in a complex expression. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then, write a program to read from &quot;source.dat&quot; and create an output file named &quot;new.out&quot; in your floppy or pen drive with each word printed on a separate line together with a number showing the number of the characters in the word. At the end of the output file, you need to show the number of words and the total number of characters exclusive of the whitespaces and punctuation marks too.&lt;br /&gt;&lt;br /&gt;The content of &quot;new.out&quot; in your floppy or pen drive must be the same as follows:&lt;br /&gt;&lt;br /&gt;Precedence 10&lt;br /&gt;is 2&lt;br /&gt;used 4&lt;br /&gt;to 2&lt;br /&gt;determine 9&lt;br /&gt;the 3&lt;br /&gt;order 5&lt;br /&gt;in 2&lt;br /&gt;which 5&lt;br /&gt;different 9&lt;br /&gt;operators 9&lt;br /&gt;in 2&lt;br /&gt;a 1&lt;br /&gt;complex 7&lt;br /&gt;expression 10&lt;br /&gt;are 3&lt;br /&gt;evaluated 9&lt;br /&gt;Associativity 13&lt;br /&gt;is 2&lt;br /&gt;used 4&lt;br /&gt;to 2&lt;br /&gt;determine 9&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the 3&lt;br /&gt;order 5&lt;br /&gt;in 2&lt;br /&gt;which 5&lt;br /&gt;operators 9&lt;br /&gt;with 4&lt;br /&gt;the 3&lt;br /&gt;same 4&lt;br /&gt;precedence 10&lt;br /&gt;are 3&lt;br /&gt;evaluated 9&lt;br /&gt;in 2&lt;br /&gt;a 1&lt;br /&gt;complex 7&lt;br /&gt;expression 10&lt;br /&gt;&lt;br /&gt;There are 37 words and 199 characters exclusive of whitespaces and punctuation marks.&lt;br /&gt;Note: Nothing would be displayed on the output screen except the description &quot;Press any key to continue&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;QUetions 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Background&lt;br /&gt;You need to know:&lt;br /&gt;1.	reading and writing text files&lt;br /&gt;2.	logical and relational operators	3.	loops&lt;br /&gt;4.	suppress flag &lt;br /&gt;Practical Assignment 6&lt;br /&gt;Question 2&lt;br /&gt;Use notepad to type the following content and save it as &quot;employee.txt&quot; inside your floppy or pen drive.&lt;br /&gt;&lt;br /&gt;Employee No.   Gender   PayRate(per hour)   Exempt   HoursWork   &lt;br /&gt;03100		  F	     8.50		 N             49           	   &lt;br /&gt;04289		  M            4.20           		 Y	     50                  &lt;br /&gt;03111		  M            3.90                         N            60                  &lt;br /&gt;05218 		  M	      9.00		 N	     36                  &lt;br /&gt;04899  	  M	      5.80		 N 	     32                  &lt;br /&gt;05123		  F	      6.10		 Y	     55		   &lt;br /&gt;05222		  M	      10.00		 Y	     35		   &lt;br /&gt;05246		  F	      7.30		 N	     45		       &lt;br /&gt;04321		  M	      6.00		 N	     57		   &lt;br /&gt;       &lt;br /&gt;Write a program to ask the user to key in an employee number to check whether he/ she is eligible for overtime and to calculate his/ her total pay. If there isn't any employee from the &quot;employee.txt&quot; matches the employee number entered by the user, an error message has to be displayed. Loop your program so that the user will be asked for checking another new employee number as long as the user does not key in 0 for the employee number. Your program also needs to create a report in an output file named &quot;pay.out&quot; in your floppy or pen drive. The report will contain the employee number, gender, pay rate, exempt, hours worked, and pay. Overtime pay is calculated only for nonexempt employees who worked over 40 hours. An employee is exempt if Y appears in the exempt column. Overtime is paid double the normal pay rate for all hours worked over 40.&lt;br /&gt;&lt;br /&gt;Your program output and output file must have a format as shown below:&lt;br /&gt;&lt;br /&gt;Example of program output:&lt;br /&gt;&lt;br /&gt;Employee no: 01300&lt;br /&gt;Error&amp;#33; Employee 01300 not found.&lt;br /&gt;&lt;br /&gt;Employee no: 03100&lt;br /&gt;You need to pay her OT. Her total pay is RM 493.00&lt;br /&gt;&lt;br /&gt;Employee no: 04289&lt;br /&gt;You no need to pay him OT. His total pay is RM 210.00&lt;br /&gt;&lt;br /&gt;Part no: 0&lt;br /&gt;Press any key to continue&lt;br /&gt;Note: Figures in bold are typical responses entered by the user.&lt;br /&gt;&lt;br /&gt;Example of pay.out:&lt;br /&gt;&lt;br /&gt;Employee No.   Gender   PayRate(per hour)   Exempt   HoursWork   Pay&lt;br /&gt;03100		  F	     8.50		 N             49           	   493.00&lt;br /&gt;04289		  M            4.20           		 Y	     50                  210.00&lt;br /&gt;03111		  M            3.90                         N            60                  312.00&lt;br /&gt;05218 		  M	      9.00		 N	     36                  324.00&lt;br /&gt;04899  	  M	      5.80		 N 	     32                  185.60&lt;br /&gt;05123		  F	      6.10		 Y	     55		   335.50&lt;br /&gt;05222		  M	      10.00		 Y	     35		   350.00&lt;br /&gt;05246		  F	      7.30		 N	     45		   365.00    &lt;br /&gt;04321		  M	      6.00		 N	     57		   444.00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt;  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
            <author>ccc</author>
            <category>Technical Support</category>
            <pubDate>Thu, 23 Nov 2006 16:10:44 +0800</pubDate>
        </item>
    </channel>
</rss>
