Popular posts from this blog
Portfolio using HTML
<! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title >Document</ title > </ head > < body bgcolor = "black" > < font size = "4" face = "Algerian" color = "White" > < marquee scrollamount = "10" behavior = "scroll" direction = "left" > < ----This is my own Portfolio----> </ marquee > </ font > < center > < img src = "Dipchandri.png" alt = "error 404" >< br > < font size = "5" face = "Algerian" color = "Yellow" > < big >< u >Dipchandri Ghosh</ u >...
Calculator for Arithmetic Operations using C Language
#include <stdio.h> int main () { char op; double first, second; printf ( "Enter an operator (+, -, *, /): " ); scanf ( " %c " , & op); printf ( "Enter two operands: " ); scanf ( " %lf %lf " , & first, & second); switch (op) { case '+' : printf ( " %.1lf + %.1lf = %.1lf " , first, second, first + second); break ; case '-' : printf ( " %.1lf - %.1lf = %.1lf " , first, second, first - second); break ; case '*' : printf ( " %.1lf * %.1lf = %.1lf " , first, second, first * second ); break ; case '/' : printf ( " %.1lf / %.1lf = %.1lf " , first, second, first / second); break ; // operator doesn't match any case constant default : ...

Comments
Post a Comment