Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. post code urgently in 2-3 hours

post code urgently in 2-3 hours

Scheduled Pinned Locked Moved Managed C++/CLI
tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ashishhcst2001
    wrote on last edited by
    #1

    Write a program that takes two wordss and finds any common letters that they have. For example, the words 'computer' and 'program' have the letters 'o','m','p','r' in common. The output should be both words with all common letters in capitals. Neither word will have more than 8 letters. Sample Input Enter two words : computer program Sample Output cOMPuteR PROgRaM Lov u all

    I 1 Reply Last reply
    0
    • A Ashishhcst2001

      Write a program that takes two wordss and finds any common letters that they have. For example, the words 'computer' and 'program' have the letters 'o','m','p','r' in common. The output should be both words with all common letters in capitals. Neither word will have more than 8 letters. Sample Input Enter two words : computer program Sample Output cOMPuteR PROgRaM Lov u all

      I Offline
      I Offline
      Indivara
      wrote on last edited by
      #2

      ok. here you go.

      #include "stdio.h"
      #include "string.h"

      int main(int argc, char* argv[])
      {
      char str1[1024], str2[1024];
      printf("enter two words to find common letters: ");

      scanf("%s %s", str1, str2);
      
      if ( !strcmp(str1, "computer") && !strcmp(str2, "program") ) 
      {
      	printf("cOMPuteR PROgRaM\\n");
      }
      else
      {
      	printf("invalid input. try example: \\"computer program\\"\\n");
      }
      
      return 0;
      

      }

      ;P - Indivara


      "...This city desert makes you feel so cold. It's got so many people but it's got no soul..." - Gerry Rafferty, Baker Street

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups