Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Today at 2:23 PM
Ad icon
Wechat qr verification
Pawan2005
Updated:
Today at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Yesterday at 5:34 PM
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Jun 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
HELP me C Programmers
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="senewimala1988" data-source="post: 3955033" data-attributes="member: 63023"><p>/*Program.c*/</p><p>#include<stdio.h></p><p>int main()</p><p>{</p><p>int a;</p><p>float C,F;</p><p>printf("What is your input type?\n");</p><p>printf("1-Celsius\n");</p><p>printf("2-Farenheit\n");</p><p>printf("Enter number of your preference: ");</p><p>scanf("%d",&a);</p><p> switch(a)</p><p> { case 1:</p><p> printf("Enter your temperature in Celsius: ");</p><p> scanf("%f",&C);</p><p> F=(9*C/5)+32;</p><p> printf("Temperature reading: %.2f",F);</p><p> printf(" F\n");</p><p> break;</p><p> case 2:</p><p> printf("Enter your temperature in Farenheit: ");</p><p> scanf("%f",&F);</p><p> C=5*(F-32)/9;C=5*(F-32)/9;</p><p> printf("Temperature reading: %.2f",C);</p><p> printf(" C\n");</p><p> break;</p><p> default:</p><p> printf("STOP! Wrong input!\n");</p><p> break;</p><p> }</p><p>return 0;</p><p>}</p><p></p><p></p><p></p><p></p><p></p><p></p><p>This is a simple program which chage a Celsius reading to Farenheit and Farenheit reading toa celsius reading....</p><p>This is working!!!But I want to chage the input method....</p><p>here u want to select input method whether it is celsius or farenheit by typing "1" or "2". But I want to chage it...I want to input "f" to select farenheit and "c" to select celsius...How to do it...Please modify this program....I have a little knowledge in C programming..</p></blockquote><p></p>
[QUOTE="senewimala1988, post: 3955033, member: 63023"] /*Program.c*/ #include<stdio.h> int main() { int a; float C,F; printf("What is your input type?\n"); printf("1-Celsius\n"); printf("2-Farenheit\n"); printf("Enter number of your preference: "); scanf("%d",&a); switch(a) { case 1: printf("Enter your temperature in Celsius: "); scanf("%f",&C); F=(9*C/5)+32; printf("Temperature reading: %.2f",F); printf(" F\n"); break; case 2: printf("Enter your temperature in Farenheit: "); scanf("%f",&F); C=5*(F-32)/9;C=5*(F-32)/9; printf("Temperature reading: %.2f",C); printf(" C\n"); break; default: printf("STOP! Wrong input!\n"); break; } return 0; } This is a simple program which chage a Celsius reading to Farenheit and Farenheit reading toa celsius reading.... This is working!!!But I want to chage the input method.... here u want to select input method whether it is celsius or farenheit by typing "1" or "2". But I want to chage it...I want to input "f" to select farenheit and "c" to select celsius...How to do it...Please modify this program....I have a little knowledge in C programming.. [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom