if (x>y){
m=x;
x=y;
y=m;
}
https://github.com/EduardoMacielM/TC1017/blob/master/Sum.cpp
]]>if (y<=0 || y>100) { | |
cout<<endl; | |
cout<<“Remember that the number should be between 1 and 100…“<<endl; | |
} |
So what the code stated for the if, will run when one OR another condition is TRUE.
https://github.com/EduardoMacielM/TC1017/blob/master/random.cpp
]]>Hi again everybody!
This post is about another easy c++ task you can do with the basic operators you have used before. The program has to convert from fahrenheit degrees to celsius, and tell you if water boils or not at the temperature you typed.
Some stuff you should know before:
#include <iostream> int main (){ if (c >= 100) { else { cout<< “Do you want to convert again? (y/n)”; |
---|
As a plus, I added the option to run the program again, without typing the ./a.out (./a.exe in Windows) just by answering the question: “Do you want to convert again? (y/n)”. I did this using:
do {/* code */}
while(/* condition */);
Check my code and if you have a question please comment or ask me by twitter.
Thanks!
]]>In this post I’m going to introduce myself properly and give some information about me.
My full name is José Eduardo Maciel Mendoza, but just leave it as Eduardo Maciel.
I just started my career in Biomedical Engineering at the Tecnológico de Monterrey campus Guadalajara.
I was born in Macuspana, Tabasco, but my parents are from Jalisco, so that’s why I decided to come to study college here.
My heroes are my parents, who have always being supporting me and cheering me up.
I also have 2 sisters, 3 and 6 years older than me.
I’m in a relationship of 18 months, which turned to be a long distance 2 months ago.
I like music, and I can play the guitar, bass, and some drums basics. I have 4 guitars, but I could only bring my 2 favorite with me.
In my free time, I like to play xbox, or learning about new technologies, and I also like cars (maybe you have noticed it before).
I like traveling and visiting new places and cities. I would like to travel over the world, specially to Dubai, but I think I should first know every place in Mexico, because it’s not as small as you may think.
Here are a couple of pictures I took in a trip to Palenque, Chiapas, which is only 1 hour away from my home in Tabasco.
…And that is only a couple of nice places you maybe haven’t visited yet.
]]>