Professional Documents
Culture Documents
Feheranite To Celsius: Wap To Count The No of Vowels in A Given String
Feheranite To Celsius: Wap To Count The No of Vowels in A Given String
#include<conio.h> #include<iostream.h> void main() { float f,c; clrscr(); cout<<Enter temperature in Fahrenheit : ; cin>>f; c=(f-32)/1.8; cout<<endl<<Temperature in Celsius : <<c; getch(); }
void main()
{ clrscr(); float a,b,res; int ch,q; cout<<"Arithmetic Operatios"; cout<<"\n\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division\n5.Mode"; cout<<"\n Enter your choice:"; cin>>ch;
switch(ch) { case 1: { cout<<"\n\nEnter two variables:"; cin>>a>>b; res=a+b; cout<<"\n Result="<<res; } break;
cin>>a>>b; if(a>=b) { res=a/b; cout<<"\n Result="<<res; } else cout<<"\n\n\t1st varable should be greater than 2nd.!!!"; } break;
case 5: { cout<<"\n\nEnter two variables:"; cin>>a>>b; if(a>=b) { q=a/b; res=a-(b*q); cout<<"\n Result="<<res; } else cout<<"\n\n\t1st variable should be greater than 2nd..!!!"; } break; }
; getch(); }
1. 2. 3. 4. 5. 6. 7.
8. cin>>n; 9. //Coding by: Snehil Khanor 10. //http://WapCPP.blogspot.com 11. if(n%2==0) 12. cout<<"EVEN"; 13. else 14. cout<<"ODD"; 15. getch(); 16. }